marked
marked copied to clipboard
feature: Fix all products to support ES5.
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.
- Fixes https://github.com/markedjs/marked/issues/3169
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.
Result
here is local build bundle
What was attempted
none
Contributor
-
[ ] Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
-
[x] 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.
- [ ] CI is green (no forced merge required).
- [ ] Squash and Merge PR following conventional commit guidelines.
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 |
Will this make the regular expressions that use unicode properties compatible with es5 browsers?
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!
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.
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.
Ya it is really huge work for anyone. Which is why we don't support older browsers