You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?:
bug.
(would be a feature if this functionality is missing altogether)
What is the current behavior?:
When using FormattedHTMLMessage to parse the following string -
Sample message string : Hello <span class='bold'>'{name}'</span>
I'm getting an 'unexpected token' error.
yarn run v1.22.4
$ extract-messages -l=messages -o dist -d en './src/components/**/!(*.test).js'
SyntaxError: [React Intl] Message failed to parse. See: https://formatjs.io/docs/icu-syntax
SyntaxError: Expected "#", "'", "\n", "{", argumentElement, double apostrophes, end of input, or tagElement but "<" found. (This is an error on an internal node. Probably an internal error.)
at File.buildCodeFrameError (/project/node_modules/@babel/core/lib/transformation/file/file.js:248:12)
at NodePath.buildCodeFrameError (/project/node_modules/@babel/traverse/lib/path/index.js:144:21)
at getICUMessageValue (/project/node_modules/extract-react-intl-messages/node_modules/babel-plugin-react-intl/dist/index.js:66:27)
at evaluateMessageDescriptor (/project/node_modules/extract-react-intl-messages/node_modules/babel-plugin-react-intl/dist/index.js:113:26)
at processMessageObject (/project/node_modules/extract-react-intl-messages/node_modules/babel-plugin-react-intl/dist/index.js:388:38)
at Array.forEach (<anonymous>)
at PluginPass.CallExpression (/project/node_modules/extract-react-intl-messages/node_modules/babel-plugin-react-intl/dist/index.js:415:38)
at newFn (/project/node_modules/@babel/traverse/lib/visitors.js:179:21)
at NodePath._call (/project/node_modules/@babel/traverse/lib/path/context.js:55:20)
at NodePath.call (/project/node_modules/@babel/traverse/lib/path/context.js:42:17)
error Command failed with exit code 1.
What is the expected behavior?:
Expecting this to be extracted like the other messages.
Suggested solution:
The text was updated successfully, but these errors were encountered:
udayrajMT
changed the title
Getting an error for using html inside message strings
Getting an error for using FormattedHTMLMessage
Jul 2, 2020
node
version: 12yarn
version: 1.22react-intl
version: 2.9.0Do you want to request a feature or report a bug?:
bug.
(would be a feature if this functionality is missing altogether)
What is the current behavior?:
When using FormattedHTMLMessage to parse the following string -
Sample message string :
Hello <span class='bold'>'{name}'</span>
I'm getting an 'unexpected token' error.
What is the expected behavior?:
Expecting this to be extracted like the other messages.
Suggested solution:
The text was updated successfully, but these errors were encountered: