haghish / markdoc

A literate programming package for Stata which develops dynamic documents, slides, and help files in various formats
http://haghish.com/markdoc
87 stars 30 forks source link

r(132): Too Few Quotes #15

Closed chris-prener closed 7 years ago

chris-prener commented 7 years ago

Hello! I really appreciate the work you've put into Markdoc - I use it primarily for teaching literate programming in classes that have not yet made the jump to R.

I do routinely have an issue with the single backtick in Markdown used to identify, for example, a variable name or a file path:

# Open `auto.dta`
The variable `mpg` is the variable that everyone uses.

When I use those backticks in my do-files, I routinely get error r(132): Too Few Quotes. I couldn't find anything in the Markdoc documentation suggesting that this element of Markdown was not supported. I've attached two working examples (as text files since do-files aren't supported in GitHub Issues), tooFewQuotes.do that replicates the issue and justEnoughQuotes.do that has identical code but without the Markdown single backticks.

I should mention that I am using the latest build of markdoc from GitHub.

Thanks for looking into this! @chris-prener

justEnoughQuotes.txt tooFewQuotes.txt

haghish commented 7 years ago

Hi Chris

I uploaded a fix and your example works fine now. Just to tell you what was the problem, the "`" sign was crashing MarkDoc when it was the last character to appear in a line.