22023dba55
An unfortunate bug in rdoc-5.0 causes a build failure on epel8. This is fixed in ruby-2.6/rdoc-6.0.2¹. Until/unless the fix is backported to RHEL-8 (which seems unlikely), we can only patch around this. Thanks, as usual, to Dan Allen for going above and beyond to patch this upstream. ¹ https://github.com/ruby/rdoc/pull/586 https://github.com/ruby/rdoc/commit/a1631aa
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('>', '>')
|