Skip to content

Commit bd640a1

Browse files
committed
docs: handle double colon in linkgit:: gracefully
Accommodate for versions before 1cca17dfff48 (Documentation: fix linkgit references, 2016-05-04): there were double colons in `linkgit::` constructs. Since we want to build older versions' manual pages, we will have to handle those since-fixed mistakes gracefully. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c0b851a commit bd640a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script/update-docs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def index_doc(filter_tags, doc_list, get_content)
349349

350350
# Generate HTML
351351
html = asciidoc.render
352-
html.gsub!(/linkgit:(\S+?)\[(\d+)\]/) do |line|
353-
x = /^linkgit:(\S+?)\[(\d+)\]/.match(line)
352+
html.gsub!(/linkgit:+(\S+?)\[(\d+)\]/) do |line|
353+
x = /^linkgit:+(\S+?)\[(\d+)\]/.match(line)
354354
relurl = "docs/#{x[1].gsub(/&#x2d;/, '-')}"
355355
"<a href='{{< relurl \"#{relurl}\" >}}'>#{x[1]}[#{x[2]}]</a>"
356356
end

0 commit comments

Comments
 (0)