Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

v1.2.0 — Added Support for Escaping Backslashes

Compare
Choose a tag to compare
@ericf ericf released this 27 Oct 04:09
· 15 commits to master since this release

This minor release adds support for escaping backslashes (formatjs/intl-messageformat#109). The following example shows how a backslash can be included in the formatted message:

Choose either: one\\\\two\\\\three.

This will produce the following AST, note the four backslashes resolve to two:

{
    "type": "messageFormatPattern",
    "elements": [
        {
            "type": "messageTextElement",
            "value": "Choose either: one\\two\\three."
        }
    ]
}