formatjs / formatjs-old

The monorepo home to all of the FormatJS related libraries.
https://formatjs.io/
156 stars 53 forks source link

add tag support to `intl-messageformat-parser` #532

Closed leonardodino closed 4 years ago

leonardodino commented 4 years ago

Which package? intl-messageformat-parser

Is your feature request related to a problem? Please describe. While I was working on a eslint plugin for validating react-intl usage I noticed that intl-messageformat-parser doesn't parse tags.

example: <download-link>text</download-link>

so I can't check that the tags used are being passed.

Describe the solution you'd like

  1. Introduce an option and a new node type to the parser, for working with tags.
  2. Add support without introducing a new option, and release it as a new major

Describe alternatives you've considered Re-implementing some custom parser on top of the current one

Additional context Hopefully such work can also be used inside react-intl and other framework libraries that interact with formatjs or ICU MessageFormat.

longlho commented 4 years ago

thanks we'll take a look soon

longlho commented 4 years ago

fixed in intl-messageformat-parser@4.0.0