Skip to content

Commit 52b8a41

Browse files
committed
Escape leading single quote in blocks
1 parent 1092b23 commit 52b8a41

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ var blockEscaper = NewRegexpReplacer(
391391
`\\`, `\(rs`,
392392
"\n\n+", "\n.PP\n",
393393
`(?m)^\.`, `\&.`,
394+
`(?m)^\'`, `\&'`,
394395
)
395396

396397
var fieldEscaper = NewRegexpReplacer(

testdata/test_full_escapes.1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ Help message to test the escapes...
1010
\&...like the leading dot.
1111
.PP
1212
Multiple line breaks, words\-with\-hyphens and \(rsbackslashes\(rs.
13+
\&'BR BR' The no\-break control character is escaped.
1314
Maybe even more to come...
1415
.SH OPTIONS

testdata/test_full_escapes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ Help message to test the escapes...
55

66

77
Multiple line breaks, words-with-hyphens and \backslashes\.
8+
'BR BR' The no-break control character is escaped.
89
Maybe even more to come...

0 commit comments

Comments
 (0)