Multiline 'code' blocks?
jfrux opened this issue · 1 comments
jfrux commented
Thinking the only difference is that in your regex we should allow for multiline?
It seems that log('this is a test
') matches code for test
but
log('this is a function () { hello; }
)
adamschwartz commented
Thanks for submitting this issue.
If you want to use a multiline string in javascript, you totally can. However note that the output won't actually display those line breaks. For example:
log("`this is a function () {\
hello;\
}`")
However, if you want multiple lines displayed in the code block, you can use \n
. For example:
log('this is multiline code: \n`a == b \n c == d`')