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

Fix extra json escaping #7

Closed
wants to merge 2 commits into from
Closed

Fix extra json escaping #7

wants to merge 2 commits into from

Conversation

pi0
Copy link
Collaborator

@pi0 pi0 commented Feb 19, 2024

Resolves #5

I checked the impl and it seems safeWriteChar for escaping <>&" is only necessary for HTML output and not JSON one.

This PR fixes it by changing all usages of writeJSONString within JOSNRenderer to unescaped (my guess even for attrs it might be unnecessary but haven't touched it)

Also added small changes in test to cover regression + only make sure JSON renderer can pass the commonmark parsing. (TODO, still failing)

@pi0
Copy link
Collaborator Author

pi0 commented Feb 19, 2024

Fixed in a0c7e78

@pi0 pi0 closed this Feb 19, 2024
@pi0 pi0 deleted the fix/escape branch February 19, 2024 16:23
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

Successfully merging this pull request may close these issues.

JSON parse error with mdToJSON on commonamrk
1 participant