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

Protect HTML from markdown parsing #401

Merged
merged 6 commits into from
Dec 7, 2022
Merged

Protect HTML from markdown parsing #401

merged 6 commits into from
Dec 7, 2022

Conversation

jcheng5
Copy link
Collaborator

@jcheng5 jcheng5 commented Jan 25, 2021

This builds on #395, preserving indentation when possible.

Closes #358
Closes #257

@ismirsehregal

This comment was marked as spam.

@cpsievert cpsievert force-pushed the joe/html-protect branch 2 times, most recently from 7b8f57d to f879a66 Compare December 7, 2022 17:52
andrewdenner and others added 5 commits December 7, 2022 14:05
When the html object contains nested tags, the default behaviour is for renderTags to indent the code. This causes an issue when the generated text is parsed by pandoc later on. Pandoc parses the indented block as "Verbatim (code) blocks", escaping it as text in the HTML and wrapping it in <pre><code> tags, The result is a non-functional widget.

To avoid this, set indent = FALSE in the call to renderTags, avoiding this opportunity for pandoc to misinterpret the input file.
@cpsievert cpsievert merged commit e375b34 into master Dec 7, 2022
@cpsievert cpsievert deleted the joe/html-protect branch December 7, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants