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

Any way to flag escaped characters on input? #20

Open
zkamvar opened this issue Sep 19, 2022 · 1 comment
Open

Any way to flag escaped characters on input? #20

zkamvar opened this issue Sep 19, 2022 · 1 comment

Comments

@zkamvar
Copy link

zkamvar commented Sep 19, 2022

commonmark supports both bare square brackets and escaped square brackets. When the enter the parser, there's no indication which set of brackets were escaped and which ones were bare:

commonmark::markdown_xml("[bare brackets] \\[escaped brackets\\]") |> writeLines()
#> <?xml version="1.0" encoding="UTF-8"?>
#> <!DOCTYPE document SYSTEM "CommonMark.dtd">
#> <document xmlns="http://commonmark.org/xml/1.0">
#>   <paragraph>
#>     <text xml:space="preserve">[bare brackets] [escaped brackets]</text>
#>   </paragraph>
#> </document>

Created on 2022-09-19 with reprex v2.0.2

Is there a way to have the parser indicate which characters were escaped in the source document?

@jeroen
Copy link
Member

jeroen commented Sep 20, 2022

You would have to ask upstream in https://github.com/commonmark/cmark

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

No branches or pull requests

2 participants