marked icon indicating copy to clipboard operation
marked copied to clipboard

feature: Fix all products to support ES5.

Open nbutmickey opened this issue 1 year ago • 6 comments

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.

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,

  • [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.

nbutmickey avatar Jan 20 '24 09:01 nbutmickey

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

vercel[bot] avatar Jan 20 '24 09:01 vercel[bot]

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

UziTech avatar Jan 20 '24 15:01 UziTech

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!

UziTech avatar Jan 20 '24 15:01 UziTech

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 avatar Jan 20 '24 15:01 nbutmickey

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.

nbutmickey avatar Jan 20 '24 15:01 nbutmickey

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

UziTech avatar Jan 20 '24 17:01 UziTech