diff options
| -rw-r--r-- | lib/asciidoctor/converter/manpage.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb index 0a2f6a44..9d5ad5f7 100644 --- a/lib/asciidoctor/converter/manpage.rb +++ b/lib/asciidoctor/converter/manpage.rb @@ -726,9 +726,7 @@ allbox tab(:);' .gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence) .gsub(EllipsisCharRefRx, '...') # horizontal ellipsis .gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&. - .gsub EscapedMacroRx do # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line - (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) - end + .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line .gsub('-', '\-') .gsub('<', '<') .gsub('>', '>') |
