Skip to content

Commit 158a2c9

Browse files
committed
update-book2: work around a regression in AsciiDoctor v2.0.19
In #1879 a regression was reported in the way the explanation of the refspec format is rendered; It is now broken. The reason is a regression in AsciiDoctor (reported at asciidoctor/asciidoctor#4624). As a work-around, replace the `+` instances (which are mis-interpreted if more than one exists in the same line) by `{plus}` (which AsciiDoctor renders exactly like AsciiDoc would). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 7f4e3a3 commit 158a2c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script/update-book2.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def genbook(language_code, &get_content)
7474
content = expand(initial_content, "progit.asc") { |filename| get_content.call(filename) }
7575
# revert internal links decorations for ebooks
7676
content.gsub!(/<<.*?\#(.*?)>>/, "<<\\1>>")
77+
# work around AsciiDoctor v2.0.19 and later mis-interpreting multiple `+` as
78+
# indicating the start or the end of literal monospace.
79+
content.gsub!(/`\+`/, "`{plus}`")
7780

7881
asciidoc = Asciidoctor::Document.new(content, attributes: { "lang" => language_code })
7982
html = asciidoc.render

0 commit comments

Comments
 (0)