-
-
Notifications
You must be signed in to change notification settings - Fork 34
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] bidi clarifications #958
Comments
Re: changing literal text, that sounds like something that ought to be done as post-processing to the MF2 output. After this was discussed earlier, I ended up implementing a PoC hackyFixArticles function in the JS |
But there is no guarantee that two different implementations will produce the same result for almost any placeholder with a function. So bidi "compatibility" would not at all guarantee "the same output in different implementations". So that forces implementations to have an option to produce the 'heavy' version of bidi control insertion, even if what most clients will want is the 'light' version (which produces the same results). As for the HTML and literal text, the main point is that an implementation's MF2 APIs should be able to have options for those. So we need to make sure that the spec doesn't exclude that. |
We're not looking to guarantee the same results, but to enable them. If there's a way for a user to get the exact same bidi isolation with two different implementations and at least one of them allows for its function handlers to be user-customizable, it becomes possible to have the same function handler behaviour in both implementations, and for the outputs to match. Also, we do include this directive: message-format-wg/spec/formatting.md Lines 828 to 829 in ec9089d
Following that, it should not matter if the output includes more isolation than strictly necessary.
The spec does not exclude those possibilities. We explicitly call out potential support for not only HTML syntax, but also DOM fragments, and we do not establish any upper bound for what the formatted output might look like or what transforms could be applied to it. |
We had a discussion around the implications of bidi isolation, in formatting.md. I'm capturing some items here for post 46.1
A related issue: in #formatting it should make it clear that callers of implementations cannot rely on the literal text in a pattern being preserved in the formatted pattern. That is, an implementation could change the literal text, such as improving the result of {{You have an {$item} in your basket.}} based on the value of $item, eg "You have an apple in your basket." vs "You have a pear in your basket.".
The text was updated successfully, but these errors were encountered: