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

[v3] markdown.marp.html setting to control which HTML elements are rendered #476

Merged
merged 4 commits into from
Dec 31, 2024

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Dec 30, 2024

Marp Core v4 has been allowed many HTML elements by default, and the new major version of Marp for VS Code is going to respect. However, markdown.marp.enableHtml should set a boolean value so cannot set an intermediate state.

Thus, we provide a new option markdown.marp.html instead markdown.marp.enableHtml:

  • off: HTML elements are completely disabled.
  • default: Some allowlisted HTML elements by Marp Core are allowed. (= markdown.marp.enableHtml: false, default)
  • all: All HTML elements are enabled. (= markdown.marp.enableHtml: true)

In the untrusted workspace, HTML elements will be completely disabled for security.

Currently if markdown.marp.enableHtml has been set as true, we still recognize it and render all HTML elements as same as v2, but the deprecation warning will show. We will retain this behavior for a certain period to encourage users to update their settings.

@yhatt yhatt merged commit c1d3cab into main Dec 31, 2024
9 checks passed
@yhatt yhatt deleted the enable-html-enum branch December 31, 2024 13:20
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.

1 participant