Files
crosspoint-reader-mod/chat-summaries/2026-02-21_17-22-summary.md

25 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

# Port PR #1068: Correct hyphenation of URLs
## Task
Port upstream PR [#1068](https://github.com/crosspoint-reader/crosspoint-reader/pull/1068) by Uri-Tauber into the mod fork. The PR was not yet merged upstream, so it was manually patched in.
## Changes made
1. **`lib/Epub/Epub/hyphenation/HyphenationCommon.cpp`**: Added `case '/':` to `isExplicitHyphen` switch, treating `/` as an explicit hyphen delimiter for URL path segments.
2. **`lib/Epub/Epub/hyphenation/Hyphenator.cpp`**: Replaced the single combined filter in `buildExplicitBreakInfos` with a two-stage check:
- First checks `isExplicitHyphen(cp)`
- Then skips repeated separators (e.g., `//` in `http://`, `--`)
- Then applies strict alphabetic-surround rule only for non-URL separators (`cp != '/' && cp != '-'`)
3. **`mod/prs/MERGED.md`**: Added PR #1068 entry with full documentation.
## Mod enhancements over upstream PR
- Included coderabbit's nitpick suggestion (not yet addressed in upstream) to prevent breaks between consecutive identical separators like `//` and `--`.
## Follow-up items
- None. Port is complete.