Skip to content

Don't drop-cap-glue a wrapped "I"/"A" in the manuscript Format pass#1276

Merged
atomantic merged 1 commit into
mainfrom
fix/manuscript-format-i-a-dropcap
Jun 15, 2026
Merged

Don't drop-cap-glue a wrapped "I"/"A" in the manuscript Format pass#1276
atomantic merged 1 commit into
mainfrom
fix/manuscript-format-i-a-dropcap

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Follow-up to the manuscript Format button. Running Format turned I\nam absolutely… into Iam absolutely….

The rejoinDropCaps pass treated any lone capital letter on its own line as a stylized drop-cap and glued it to the next line with no space (T\nheThe). But I and A are the only single-letter English words, so a lone I/A is almost always the word wrapped to its own line — confirmed against the real stored source:

system log, flagged as personal
I
am absolutely, definitely, one hundred

Fix: exclude I and A from the drop-cap regex ([A-Z][B-HJ-Z]). They fall through to reflowProse, which joins them with a space (I am). Genuine drop-caps (T, S, …) are unchanged. The rare drop-cap In/And is the accepted miss.

Test plan

  • client/src/lib/manuscriptFormat.test.js — new tests: wrapped II am, wrapped AA man, and a genuine T drop-cap still glues to The. 31 tests, all green.
  • eslint clean.

A lone capital letter on its own line was always treated as a stylized
drop-cap and joined to the next line with NO space ("T\nhe" → "The"). But "I"
and "A" are the only single-letter English words, so a lone "I"/"A" is almost
always the WORD wrapped to its own line:

    system log, flagged as personal
    I
    am absolutely, definitely, one hundred

That turned "I\nam …" into "Iam …". Exclude I and A from the drop-cap regex
([A-Z] → [B-HJ-Z]) so they fall through to reflow and join with a space ("I
am"). The rare drop-cap "In"/"And" is the accepted miss.
@atomantic atomantic merged commit b431474 into main Jun 15, 2026
2 checks passed
@atomantic atomantic deleted the fix/manuscript-format-i-a-dropcap branch June 15, 2026 16:53
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