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

Disabling unicode isolation on per-placeable basis #599

Open
Loskir opened this issue Oct 1, 2022 · 2 comments
Open

Disabling unicode isolation on per-placeable basis #599

Loskir opened this issue Oct 1, 2022 · 2 comments

Comments

@Loskir
Copy link

Loskir commented Oct 1, 2022

Is there a way to disable unicode isolation for certain placeables? For example, where I am sure that I'm using <bdi> correctly. But without disabling it everywhere else

@zbraniecki
Copy link
Collaborator

I don't think there is, but I can see a value of such addition. We currently allow to disable it per formatter - so you could create Localization for FluentBundle, disable it for this one, and use it only for this one message.

But if you have ideas for PRs to improve that, I believe @eemeli would consider it!

@eemeli
Copy link
Member

eemeli commented Oct 2, 2022

I'm not sure that an option or some other toggle for this would necessarily make sense; we should instead endeavour to make this work automagically.

At the moment, we add the marks unconditionally if useIsolating is set:

if (useIsolating) {
result.push(FSI);
}
result.push(resolveExpression(scope, elem).toString(scope));
if (useIsolating) {
result.push(PDI);
}

Would it make sense or be sufficient to detect if the stringified value already starts & ends with FSI/PDI before adding those, or would the appropriate conditional here be more complicated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants