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

feature: Fix all products to support ES5. #3171

Closed
wants to merge 1 commit into from

Conversation

nbutmickey
Copy link

Marked version:

11.1.1

Markdown flavor: n/a

Description

This PR fixes the issue of the output not supporting ES5, which requires users to compile marked twice.

Expectation

The output in version 11.1.1 contains a significant amount of ES6 syntax, requiring users to compile marked twice. Otherwise, it won't run in environments that do not support ES6 syntax, as shown in the following image.

image

Result

here is local build bundle
image

What was attempted

none

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,

  • no tests required for this PR.

  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

Copy link

vercel bot commented Jan 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2024 9:46am

@UziTech
Copy link
Member

UziTech commented Jan 20, 2024

Will this make the regular expressions that use unicode properties compatible with es5 browsers?

@UziTech
Copy link
Member

UziTech commented Jan 20, 2024

If we are going to support es5 browsers we will need tests to ensure no breaking changes. Can you write a test framework to run all the tests on old browsers as well. Thanks!

@nbutmickey
Copy link
Author

Will this make the regular expressions that use unicode properties compatible with es5 browsers?

Compile it into ES5 code using only the TypeScript compilation engine.

@nbutmickey
Copy link
Author

If we are going to support es5 browsers we will need tests to ensure no breaking changes. Can you write a test framework to run all the tests on old browsers as well. Thanks!

hhh,it is really a huge work for me,I understand that code compiled using the TypeScript engine should be reliable.

@UziTech
Copy link
Member

UziTech commented Jan 20, 2024

Ya it is really huge work for anyone. Which is why we don't support older browsers

@UziTech UziTech closed this Feb 20, 2024
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.

Incompatibility with esNext Syntax in marked.js Bundle
2 participants