Open Bug 1957785 Opened 5 months ago Updated 4 months ago

line breaking should not occur before sup/sub, even in presence of parentheses or brackets

Categories

(Core :: Internationalization, defect, P3)

Firefox 136
defect

Tracking

()

People

(Reporter: vincent-moz, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Firefox should not introduce a line break before sup/sub, even in presence of parentheses or brackets.

Consider the following example:

data:text/html,
<p style="width:20em">mmmmmmmmmmmm (mmm)<sup>mmmmmmmmmm</sup></p>
<p style="width:20em">mmmmmmmmmmmm mmm<sup>[mmmmmmmmmm]</sup></p>
<p style="width:20em">mmmmmmmmmmmm (mmm)<sup>[mmmmmmmmmm]</sup></p>

Line breaking is correct on the first two paragraphs: the line break occurs at the space character. But for the third paragraph, the line break occurs between "(mmm)" and "[mmmmmmmmmm]". Same issue with sub instead of sup.

The lynx web browser does not have this issue (it does not support CSS, so for the test, one needs to reduce the terminal window, or one can use lynx -dump -width=32 test.html).

Note: this affects Wikipedia, where the references appear in superscript and are enclosed by square brackets.

I can reproduce this bug, and I can see the expected behavior after setting intl.icu4x.segmenter.enabled to false.

Status: UNCONFIRMED → NEW
Component: Layout: Text and Fonts → Internationalization
Ever confirmed: true

The left hand side is current Nightly, where the right hand side is current Nightly with intl.icu4x.segmenter.enabled set to false.

Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: