diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-05-25 18:38:25 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-05-25 18:38:25 -0600 |
| commit | 35a4aeb489d8f25022bf32fd6e4d00d5b6347c99 (patch) | |
| tree | 194845243f445a8c37175da800e2f11ea74a1177 | |
| parent | 1441e0320f1d1b4fa12cccadd394ddddd1c3b82e (diff) | |
use single-line block in manify method in manpage converter to make it easier to patch
| -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('>', '>') |
