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

Document data does not escape single quotes for JSX. #179

Open
AdeAttwood opened this issue Apr 23, 2022 · 0 comments
Open

Document data does not escape single quotes for JSX. #179

AdeAttwood opened this issue Apr 23, 2022 · 0 comments

Comments

@AdeAttwood
Copy link

When rendering a document in to JSX you cannot use a ' in the title. The resulting JavaScript code results in a syntax error. For example, the following document.

#+TITLE: This don't work

The document ...

Will create the JavaScript.

const title = 'This don't work';

The error can be replicated on the playground, where the JSX and preview tags don't show anything. After a bit of digging, I think it's coming from here. I will try and put together a PR wapping the value in a JSON.stringify. If you have any other suggestions, let me know.


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