Skip to content

Divide long UEB strings with the continuation indicator - #177

Merged
krperry merged 1 commit into
mainfrom
continuation-indicator
Oct 18, 2026
Merged

krperry merged 1 commit into
mainfrom
continuation-indicator

Conversation

@krperry

@krperry krperry commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

When an unspaced string such as a URL is longer than a whole line,
BrailleBlaster cut it at the end of the line with nothing to mark the
division, sometimes inside a word ("p]sonal-bank" / "+4html"). UEB
requires the line continuation indicator, dot 5 ("), at the end of
each line that divides such a string.

Changes (utd)

  • LineWrapper gains a divideLongWord hook. The default returns
    null and keeps the old cut.
  • New UebLineWrapper divides at the last natural point that fits
    with room for the indicator: after _/ or a hyphen, or before a dot
    (4) or @a. Failing that, it takes the last place that keeps a
    prefix cell with its cell and a number sign with its digits. Spaced
    text, and Unicode text that isn't Braille cells, keep the old cut.
  • PageBuilder uses UebLineWrapper for literary text only when the
    main table is UEB. EBAE, Spanish, Cherokee and the others are
    unchanged, and math keeps its own wrapper.
  • A string that fits whole on the next line still moves there.

BrailleBlaster still moves a long URL to a new line before dividing
it, so its division points differ from Duxbury's, which starts the
URL on the current line.

Testing

  • New UebLineWrapperTest: division at a slash and before a dot, not
    inside a word; prefixes and numbers kept whole; a string that fits
    on the next line moves without the indicator; a URL over three
    lines; non-UEB tables unchanged; spaced text not divided.
  • FormattingTest.longWordLineWrapTest now expects the UEB division
    with the indicator.
  • check_continuation.py: all 6 continuation statements pass. BR-102
    and BR-78 now show the indicator, and every page fits 40 cells by
    25 lines.
  • Regression statements unchanged. BR-83_acbs differs from its old
    baseline only by the bullet removal from Fix List Paragraph bullets and lone list bullets in DOCX import #176.
  • mvnw package with tests passes.

When an unspaced string such as a URL was longer than a whole line,
PageBuilder cut it at the end of the line and carried on at the start
of the next. Nothing marked the division, and it could fall inside a
word, so "personal-banking.html" read "p]sonal-bank" / "+4html".

UEB marks such a division with the line continuation indicator, dot 5
(" in ASCII braille), at the end of the line. LineWrapper gains a
divideLongWord hook; by default it returns null and keeps the old
cut. The new UebLineWrapper divides at the last natural point that
fits with room for the indicator: after a slash or hyphen, or before
a dot or an at sign. Failing that, it takes the last place that keeps
a prefix cell with its cell and a number sign with its digits. Text
with spaces, or Unicode text that is not Braille cells, keeps the old
cut.

PageBuilder uses UebLineWrapper for literary text only when the main
table is UEB, so EBAE, Spanish and the other codes are unchanged, and
math keeps its own wrapper. A string that fits whole on the next line
still moves there.

FormattingTest.longWordLineWrapTest runs UEB with a 45-cell unspaced
string, so it now expects the division before the dot with the
indicator.
@krperry
krperry merged commit 1c9ee92 into main Oct 18, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant