Skip to content

Regular expressions s (dotAll) flag #4880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 30, 2018

Conversation

GeoffreyBooth
Copy link
Collaborator

@GeoffreyBooth GeoffreyBooth commented Feb 3, 2018

This adds support for ES2018’s s (dotAll) flag.

The syntax is only supported in Node 9+, so I added Node 9 to the list of versions we test in CI.

Merging this in would mean that we would need to expand the “Compatibility” section of the docs that currently say:

With the exception of modules and JSX, all the modern JavaScript features that CoffeeScript supports can run natively in Node 7.6+.

We would probably need to put a table there, listing the features required by certain Node versions (i.e. async functions: 7.6+, dotAll flag: 9+, etc.).

@aminland
Copy link

aminland commented Mar 25, 2018

Should we wait for this to be stage 4 first? otherwise you have to use the plugin transform-modern-regexp unless we don't care about IE anymore...

@GeoffreyBooth
Copy link
Collaborator Author

This feature is at Stage 4: https://github.com/tc39/proposal-regexp-dotall-flag

@GeoffreyBooth
Copy link
Collaborator Author

@jashkenas @lydell @zdenko @connec I updated the docs to start listing features that CoffeeScript supports that are newer than Node 7.6. See this diff. Any feedback on this language?

Note also that Node’s new, native support for modules needs to be addressed. It was painful just writing the instructions for how to use .mjs files now; we should make this better. Please see #5018.

@jashkenas
Copy link
Owner

Looks good! I would, personally, omit the "Why doesn't CoffeeScript simply always transpile?" paragraph.

@GeoffreyBooth
Copy link
Collaborator Author

I would, personally, omit the “Why doesn’t CoffeeScript simply always transpile?” paragraph.

Yeah, I think that made more sense back when we were introducing CoffeeScript 2, but it isn’t needed anymore.

@GeoffreyBooth GeoffreyBooth merged commit 47c491f into jashkenas:master Mar 30, 2018
@GeoffreyBooth GeoffreyBooth deleted the regex-dotall branch March 30, 2018 22:25
@GeoffreyBooth GeoffreyBooth mentioned this pull request Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants