Skip to content

@russellmcc /interp.coffee
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
test file for string interpolation highlighting in coffee-script
###
Interpolation test file
###
dqs = " Double quotes are
multi-line,
and they can have #{ string_interpolation = "cool" }, and
they need to escape \" but not ', (\' \n should be fine too)
and that's about all. "
meh = "also \ at end of line is fine \
if next isn't a end-of-string"
indeed = "\#{ shouldnot = 'trigger string interpolation'"
sqs = 'Single quotes are
also multi-line
and they interpret #{ string_interpolations = "literally" } so we
should not highlight them. we need to escape \' but not ", although we can \"
'
tdqs = """
triple-double quotes don't need to escape ' or " and
they #{ have = "string interpolations" }. Yessir.
"""
tsqs = '''
single quotes are similar in that they don't need to escape ' or ", but
they #{dont = "have string interpolations" }. oh no.'''
console.log indeed, dqs, meh, sqs, tdqs, tsqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.