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

Help: How to use FormatJS with NodeJS? #1755

Closed
meness opened this issue Jun 26, 2020 · 2 comments
Closed

Help: How to use FormatJS with NodeJS? #1755

meness opened this issue Jun 26, 2020 · 2 comments

Comments

@meness
Copy link

meness commented Jun 26, 2020

I imported intl-messageformat package. My string contains HTML tags and I don't know how to make it work because it throws following exception: Expected "#", "'", "\n", "{", argumentElement, double apostrophes, end of input, or tagElement but "<" found.

@longlho
Copy link
Member

longlho commented Jun 26, 2020

you can use the ignoreTag option in our latest version of intl-messageformat to treat HTML tag as string literal and not parse it

@longlho
Copy link
Member

longlho commented Jun 26, 2020

This doc should help you get started: https://formatjs.io/docs/intl-messageformat/#intlmessageformat-constructor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants