ParseOptions.strict property
By default, the parsing applies a few relaxations to the ICU MessageFormat spec. Setting strict: true will disable these relaxations.
Signature:
strict?: boolean;
Remarks
-
The
argTypeofsimpleArgformatting functions will be restricted to the set ofnumber,date,time,spellout,ordinal, andduration, rather than accepting any lower-case identifier that does not start with a number. -
The optional
argStyleofsimpleArgformatting functions will not be parsed as any other text, but instead as the spec requires: “In argStyleText, every single ASCII apostrophe begins and ends quoted literal text, and unquoted {curly braces} must occur in matched pairs.” -
Inside a
pluralorselectordinalstatement, a pound symbol (#) is replaced with the input number. By default,#is also parsed as a special character in nested statements too, and can be escaped using apostrophes ('#'). In strict mode#will be parsed as a special character only directly inside apluralorselectordinalstatement. Outside those,#and'#'will be parsed as literal text.