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

what about escape of braces? #221

Open
vipcxj opened this issue Apr 25, 2017 · 3 comments
Open

what about escape of braces? #221

vipcxj opened this issue Apr 25, 2017 · 3 comments

Comments

@vipcxj
Copy link

vipcxj commented Apr 25, 2017

In the playground, I enter brace in the templates code, and it reports 'Failed to parse text '{''. So is there a way to escape brace?

@nippur72
Copy link
Contributor

It's ugly but there's a workaround:

<div>{'\u007b'} hello {'\u007d'}</div>

I don't remember if there's an issue open, but react-templates should parse html-entities correctly. If it did, it would have been as simple as &#123;.

@vipcxj
Copy link
Author

vipcxj commented Apr 26, 2017

Thanks for the rapid reply. By the way, is any way to track the build of the ast tree, and do some custom operations on the react dom tree created.

@nippur72
Copy link
Contributor

@vipcxj can you make an example? what do you need to achieve?

Some time ago I proposed a pluggable architecture (see #178) but the PR is still on hold.

I have also written a plugin-like for webpack, see react-templates-preprocess-loader.

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