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

Single quotes replaced with double quotes inside script blocks #1

Closed
wch opened this issue Feb 3, 2014 · 4 comments
Closed

Single quotes replaced with double quotes inside script blocks #1

wch opened this issue Feb 3, 2014 · 4 comments

Comments

@wch
Copy link
Contributor

wch commented Feb 3, 2014

I'm trying to inline some scripts into a markdown document. I'm running into a problem where single quotes are replaced with double quotes. For example, take this source document:

Title
========================================================

The code inside the script block doesn't appear correctly when this is rendered with the rmarkdown package.

<script>
var foo = "<a href='/a'>a</a><input type='checkbox'/>"
</script>

Text Text Text

After running rmarkdown::render on it, the resulting html file has this:

<script>
var foo = "<a href="/a">a</a><input type="checkbox"></input>"
</script>
@jjallaire
Copy link
Member

It looks like this a bug in pandoc triggered by the use of --self-contained. I've posted on the pandoc-discuss group to follow up:

https://groups.google.com/forum/#!topic/pandoc-discuss/0A_dx9Yhj-s

@hadley
Copy link
Member

hadley commented Feb 3, 2014

This may be related to #2, where the contents of block level tags is interpreted as markdown.

@jjallaire
Copy link
Member

The fix to Issue #2 didn't make any difference here. Just to make sure there wasn't a bug introduced by some other pandoc extension I changed the format to "markdown_strict" (no pandoc extensions enabled) and this still occurs. I think it's a bug strictly related to --self-contained

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants