mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
refactor: remove unused constant and update comment
This commit is contained in:
parent
8b114b087c
commit
6848875bd8
@ -690,7 +690,6 @@ fn breakpoints(p: &Preparation, mut f: impl FnMut(usize, Breakpoint)) {
|
|||||||
let breakpoint = if point == text.len() {
|
let breakpoint = if point == text.len() {
|
||||||
Breakpoint::Mandatory
|
Breakpoint::Mandatory
|
||||||
} else {
|
} else {
|
||||||
const LTR_ISOLATE: char = '\u{2066}';
|
|
||||||
const OBJ_REPLACE: char = '\u{FFFC}';
|
const OBJ_REPLACE: char = '\u{FFFC}';
|
||||||
match lb.get(c) {
|
match lb.get(c) {
|
||||||
LineBreak::MandatoryBreak
|
LineBreak::MandatoryBreak
|
||||||
@ -708,9 +707,10 @@ fn breakpoints(p: &Preparation, mut f: impl FnMut(usize, Breakpoint)) {
|
|||||||
// https://www.unicode.org/reports/tr14/#LB20
|
// https://www.unicode.org/reports/tr14/#LB20
|
||||||
//
|
//
|
||||||
// Don't provide a line breaking opportunity between a LTR-
|
// Don't provide a line breaking opportunity between a LTR-
|
||||||
// ISOLATE and an OBJECT-REPLACEMENT-CHARACTER representing
|
// ISOLATE (or any other Combining Mark) and an OBJECT-
|
||||||
// and inline item, if the LTR-ISOLATE could end up as the
|
// REPLACEMENT-CHARACTER representing and inline item, if the
|
||||||
// only character on the previous line.
|
// LTR-ISOLATE could end up as the only character on the
|
||||||
|
// previous line.
|
||||||
LineBreak::CombiningMark
|
LineBreak::CombiningMark
|
||||||
if text[point..].starts_with(OBJ_REPLACE)
|
if text[point..].starts_with(OBJ_REPLACE)
|
||||||
&& last == (point - c.len_utf8()) =>
|
&& last == (point - c.len_utf8()) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user