Created
August 11, 2014 13:26
-
-
Save dancek/a6b3b9c1660a20174ffd to your computer and use it in GitHub Desktop.
How different multiline strings behave in CoffeeScript 1.7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = """<p> | |
foo | |
</p>""" | |
b = '''<p> | |
foo | |
</p>''' | |
c = "<p> | |
foo | |
</p>" | |
d = '<p> | |
foo | |
</p>' | |
e = "<p>\ | |
foo\ | |
</p>" | |
f = '<p>\ | |
foo\ | |
</p>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a, b, c, d, e, f; | |
a = "<p>\n foo\n</p>"; | |
b = '<p>\n foo\n</p>'; | |
c = "<p> foo </p>"; | |
d = '<p> foo </p>'; | |
e = "<p>foo</p>"; | |
f = '<p>foo</p>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: CoffeeScript < 1.7 actually behaves differently (there's no way to get rid of whitespace in indentation)