@@ -38,10 +38,19 @@ Asciidoctor::Extensions.register :git do
doc = document
- # Override attributes for man pages.
- # https://github.com/asciidoctor/asciidoctor/issues/4059
if doc.backend == 'manpage'
+ # Override attributes for man pages.
+ # https://github.com/asciidoctor/asciidoctor/issues/4059
doc.attributes.merge!({ 'litdd' => '\--', 'plus' => '+' })
+
+ # Fix bug with \\
+ if Asciidoctor::VERSION < '2.0.11'
+ postprocessor do
+ process do |_, output|
+ output.gsub("\\(rs\\\\", "\\(rs\\(rs\\")
+ end
+ end
+ end
end
inline_macro :linkgit do
\\ gets converted erroneously. [1] https://github.com/asciidoctor/asciidoctor/issues/3456 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- Documentation/asciidoctor-extensions.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)