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

Tracking backslash escapes? #450

Open
zkamvar opened this issue Sep 20, 2022 · 0 comments
Open

Tracking backslash escapes? #450

zkamvar opened this issue Sep 20, 2022 · 0 comments

Comments

@zkamvar
Copy link

zkamvar commented Sep 20, 2022

I think this is similar/related to #131 and #292, but one thing I noticed is that bare square brackets do not roundtrip:

Input:

[unescaped brackets],  \[escaped brackets\] and [a link](https://example.com)

Output:

\[unescaped brackets\],  \[escaped brackets\] and [a link](https://example.com)

Is there a way to add an attribute that can track the position of escaped characters in a line?

This is useful for me because I'm trying to parse and rewrite documents that have reference links in child documents, and I have to backtrack to identify and protect these links from being overwritten.

(originally reported this in r-lib/commonmark#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

No branches or pull requests

1 participant