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

fix: escape {{ in code (#1316) #1317

Merged
merged 1 commit into from Feb 21, 2024
Merged

fix: escape {{ in code (#1316) #1317

merged 1 commit into from Feb 21, 2024

Conversation

KermanX
Copy link
Member

@KermanX KermanX commented Feb 21, 2024

fixes #1316.

Previously, only "full" mustache syntax ({{...}}) is escaped. However, Vue regards {{ as the start of mustache syntax, no matter what the following code is.

This PR escapes all {{ in Shiki-rendered HTML. I think it is only 99.999% safe, but I can't find a better solution.

In Vitepress, only {{...}} is replaced:
https://github.com/vuejs/vitepress/blob/28989df83446923a9e7c8ada345b0778119ed66f/src/node/markdown/plugins/highlight.ts#L127-L134

@antfu antfu merged commit 900b37c into slidevjs:main Feb 21, 2024
8 checks passed
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.

Elixir code snippets containing a tuple inside another tuple cause the CLI to crash
2 participants