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

Stop auto detection of syntax highlight language #202

Closed
yhatt opened this issue Dec 4, 2020 · 0 comments · Fixed by #205
Closed

Stop auto detection of syntax highlight language #202

yhatt opened this issue Dec 4, 2020 · 0 comments · Fixed by #205

Comments

@yhatt
Copy link
Member

yhatt commented Dec 4, 2020

By the historical background, Marp has detected the language for syntax highlight in the code block automatically until now.

```
const a = 1
```

However, this behavior is a bit confusable because the other services using Markdown have not colored the plain code block. e.g. marp-team/marp-vscode#12 had mentioned to this problem.

In addition, recently we've recieved the potential ReDOS vulnerabilities in GHSA-7wwv-vh3v-89cq (Fix in #201). Using highlightAuto may be vulnerable.

return highlightjs.highlightAuto(code).value

Thus, we have to consider stopping auto detection of syntax highlight language.

This change will break existed slides, and affected user should specify the language manually. But I think this is a natural behavior as Markdown.

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 a pull request may close this issue.

1 participant