Don't drop-cap-glue a wrapped "I"/"A" in the manuscript Format pass#1276
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the manuscript Format button. Running Format turned
I\nam absolutely…intoIam absolutely….The
rejoinDropCapspass 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\nhe→The). ButIandAare the only single-letter English words, so a loneI/Ais almost always the word wrapped to its own line — confirmed against the real stored source:Fix: exclude
IandAfrom the drop-cap regex ([A-Z]→[B-HJ-Z]). They fall through toreflowProse, which joins them with a space (I am). Genuine drop-caps (T,S, …) are unchanged. The rare drop-capIn/Andis the accepted miss.Test plan
client/src/lib/manuscriptFormat.test.js— new tests: wrappedI→I am, wrappedA→A man, and a genuineTdrop-cap still glues toThe. 31 tests, all green.eslintclean.