Skip to content

Commit c0b851a

Browse files
committed
docs: handle gitlink: gracfully
Older Git versions had this incorrect construct. Even back then, the correct incantation was `linkgit:`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 98feb15 commit c0b851a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script/update-docs.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ def index_doc(filter_tags, doc_list, get_content)
328328
page_data = data["pages"][docname]
329329

330330
content = expand_content((get_content.call sha).force_encoding("UTF-8"), path, get_content_f, generated)
331+
# Handle `gitlink:` mistakes (the last of which was fixed in
332+
# dbf47215e32b (rebase docs: fix "gitlink" typo, 2019-02-27))
333+
content.gsub!(/gitlink:/, "linkgit:")
331334
content.gsub!(/link:(?:technical\/)?(\S*?)\.html(\#\S*?)?\[(.*?)\]/m, "link:/docs/\\1\\2[\\3]")
332335

333336
asciidoc = make_asciidoc(content)

0 commit comments

Comments
 (0)