Skip to content
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

Detect pretty JavaScript when parsing to AST #1111

Open
wants to merge 2 commits into
base: v6
Choose a base branch
from

Conversation

Munter
Copy link
Member

@Munter Munter commented Aug 22, 2020

Detect JavaScript prettiness before parsing text to AST, in order to be able to retain minification or prettification at serialization time.

Uses a very naive regex match against common human readable formatted javascript, which seems to be biased towards detecting as minified code for inlined one-liners

Fixes #1110

TODO:

  • Make the existing test suite pass
  • Test cases to verify basic functionality
  • Test cases to verify behavior with common code formatters and minifiers

…r to output text the same way when serializing. Fixes #1110
@Munter Munter force-pushed the feature/detect-pretty-javascript branch from 41ff681 to 044f829 Compare August 22, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant