markedjs / marked

A markdown parser and compiler. Built for speed.
https://marked.js.org
Other
33.23k stars 3.39k forks source link

BREAKING CHANGE: escape html in renderer #3495

Closed UziTech closed 1 week ago

UziTech commented 1 month ago

Marked version: 14.1.3

Description

Only escape text in renderer instead of in tokenizer.

The tokenizer should only pull the information out of the markdown and put it into tokens. The renderers should take the information from the tokens and output HTML, including escaping where relevant.

This is a breaking change because some extensions will have to update their tokenizers and renderers to follow this pattern.

Contributor

Committer

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

vercel[bot] commented 1 month ago

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 Oct 21, 2024 5:42am
UziTech commented 2 weeks ago

@race-of-sloths

race-of-sloths commented 2 weeks ago

@UziTech Thank you for your contribution! Your pull request is now a part of the Race of Sloths! You are true leader! Other sloths hot on your heels, keep moving!

[

<source media="(prefers-color-scheme: light)" srcset="https://race-of-sloths.com/images/bot-banner-light.svg">
<img alt="Shows inviting banner with latest news." src="https://race-of-sloths.com/images/bot-banner-light.svg">

](https://race-of-sloths.com/latest-news)

[

<source media="(prefers-color-scheme: light)" srcset="https://badge.race-of-sloths.com/UziTech?type=bot&pr=markedjs/marked/3495&theme=light">
<img alt="Shows profile picture for the author of the PR" src="https://badge.race-of-sloths.com/UziTech?type=bot&pr=markedjs/marked/3495&theme=white">

](https://race-of-sloths.com/profile/UziTech)

Current status: executed | Reviewer | Score | |--------|--------| | @race-of-sloths | 2 | Your contribution is much appreciated with a final score of 2! You have received 20 Sloth points for this contribution
What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors: - Tag @race-of-sloths inside your pull requests - Wait for the maintainer to review and score your pull request - Check out your position in the [Leaderboard](https://race-of-sloths.com/leaderboard) - Keep weekly and monthly streaks to reach higher positions - Boast your contributions with a dynamic picture of your [Profile](https://race-of-sloths.com/profile/UziTech) For maintainers: - Score pull requests that participate in the Race of Sloths and receive a reward - Engage contributors with fair scoring and fast responses so they keep their streaks - Promote the Race to the point where the Race starts promoting you - Grow the community of your contributors Feel free to check [our website](https://race-of-sloths.com) for additional details!

Bot commands - For contributors - **Include a PR:** `@race-of-sloths include` to enter the Race with your PR - For maintainers: - **Invite contributor** `@race-of-sloths invite` to invite the contributor to participate in a race or include it, if it's already a runner. - **Assign points:** `@race-of-sloths score [1/2/3/5/8/13]` to award points based on your assessment. - **Reject this PR:** `@race-of-sloths exclude` to send this PR back to the drawing board. - **Exclude repo:** `@race-of-sloths pause` to stop bot activity in this repo until `@race-of-sloths unpause` command is called
race-of-sloths commented 1 week ago

🥁 Score it!

@styfle, please score the PR with @race-of-sloths score [1/2/3/5/8/13]. The contributor deserves it. If no scoring is provided within 24 hours, this PR will be scored as 2 🦥