26 lines
1.4 KiB
Diff
26 lines
1.4 KiB
Diff
|
From cc9a8d3cd12f2c15e43bd263b8b8a9b32d097831 Mon Sep 17 00:00:00 2001
|
||
|
From: Dan Allen <dan.j.allen@gmail.com>
|
||
|
Date: Thu, 25 May 2023 18:39:56 -0600
|
||
|
Subject: [PATCH] use single-line block in manify method in manpage converter
|
||
|
to make it easier to patch
|
||
|
|
||
|
---
|
||
|
lib/asciidoctor/converter/manpage.rb | 4 +---
|
||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb
|
||
|
index bcf2b784..a7aba996 100644
|
||
|
--- a/lib/asciidoctor/converter/manpage.rb
|
||
|
+++ b/lib/asciidoctor/converter/manpage.rb
|
||
|
@@ -716,9 +716,7 @@ def manify str, opts = {}
|
||
|
.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('>', '>')
|