Skip to content

[FEEDBACK] Unpaired bidi isolates should not be a parse error #788

@eemeli

Description

@eemeli

An observation from implementing bidi isolation as proposed in #781, but which also applies to the currently proposed design for bidi usability:

Requiring the pairing of open-isolate and close-isolate sets up developers to get parse errors for missing or required invisible characters.

As currently proposed, the following message would result in a parse error as it includes an unpaired PDI immediately before the }:

Hello {$world⁩}

In many editors (such as this very form) the LRI/RLI/FSI/PDI characters are not displayed, and are invisibly skipped when moving past them with left/right arrow keys.

This is a setup for developers having a really bad time with MF2; if they start with a message that includes invisible-to-them isolating characters and apply some changes, it's entirely possible that they end up with a message as above, which looks right, but for which a parser complains.

To avoid this, we should not consider missing isolate characters to be a parse error. It should be something for a linter to complain about, but at formatting runtime we should ignore the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Preview-FeedbackFeedback gathered during the technical previewsyntaxIssues related with syntax or ABNF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions