Commit a4b6e8a
committed
Heregex Comment
Fixes #5428
This fix is simple enough but it causes a substantial change in behavior for Heregexes.
`#` inside of a character class shouldn't be considered a comment. By treating `#`
without whitespace in front as non-comments we could have slight compatability with
Python.
There are other places in the CoffeeScript source where people avoided escaping the `#`
by keeping it next to non-whitespace characters even outside of a character class. This
is different than how Python does it and is probably a bug but maybe it is too late with
the de facto CoffeeScript2 behavior.
I'm not sure if this should be merged in since it changes the behavior quite a lot. Maybe
another one for the CoffeeScript3/Civet bucket.
Refs
---
Python Docs: https://docs.python.org/3/library/re.html#re.X1 parent 1dfa23b commit a4b6e8a
File tree
8 files changed
+17
-17
lines changed- docs/v2
- browser-compiler-legacy
- browser-compiler-modern
- lib
- coffeescript-browser-compiler-legacy
- coffeescript-browser-compiler-modern
- coffeescript
- src
8 files changed
+17
-17
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
1379 | | - | |
| 1379 | + | |
1380 | 1380 | | |
1381 | 1381 | | |
1382 | 1382 | | |
1383 | 1383 | | |
1384 | 1384 | | |
1385 | 1385 | | |
1386 | 1386 | | |
1387 | | - | |
| 1387 | + | |
1388 | 1388 | | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | | - | |
| 1391 | + | |
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5783 | 5783 | | |
5784 | 5784 | | |
5785 | 5785 | | |
5786 | | - | |
| 5786 | + | |
5787 | 5787 | | |
5788 | 5788 | | |
5789 | 5789 | | |
| |||
0 commit comments