Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eemeli opened this issue May 13, 2024 · 1 comment
Open

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

eemeli opened this issue May 13, 2024 · 1 comment
Labels
Preview-Feedback Feedback gathered during the technical preview syntax Issues related with MF Syntax

Comments

@eemeli
Copy link
Collaborator

eemeli commented May 13, 2024

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.

@eemeli eemeli added syntax Issues related with MF Syntax Preview-Feedback Feedback gathered during the technical preview labels May 13, 2024
@aphillips
Copy link
Member

This is a good callout. I can modify my design as well, but will wait to merge #781 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Preview-Feedback Feedback gathered during the technical preview syntax Issues related with MF Syntax
Projects
None yet
Development

No branches or pull requests

2 participants