{{ message }}
Repository navigation
Commit 4cf17dd
Join hyphenated words broken across lines in Javadoc comments.
When a compound word was hyphenated across a line break in Javadoc
(e.g., `infinite-\n * precision`), the formatter previously joined the
tokens with a space, resulting in `infinite- precision`.
Join adjacent word literals across a line break when the preceding literal ends
in a hyphen following a word character, while preserving spaces after suspended
hyphens (e.g., `pre- and post-`).
Ported from google/google-java-format#1475 (commit 55863463), adapted to this
fork's Token API. The markdown `///` test does not apply here. The tests were
written first: hyphenatedLineBreakJoined failed with `infinite- precision`,
suspendedHyphenPreserved and hyphenBeforeParagraphBreakNotJoined guard the
cases that must stay as they are.1 parent a9a4744 commit 4cf17dd
2 files changed
Lines changed: 80 additions & 4 deletions
File tree
- open-java-format/src
- main/java/com/palantir/javaformat/java/javadoc
- test/java/com/palantir/javaformat/java

0 commit comments