Skip to content

fix the fixups in historical mistakes in the documentation #2013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions script/update-docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -434,16 +434,16 @@ def index_doc(filter_tags, doc_list, get_content)
content = expand_content((get_content.call sha).force_encoding("UTF-8"), path, get_content_f, generated, ext)
# Handle `link:../howto/maintain-git.txt`, which should point to
# a `.html` target instead
content.gsub!(/link:\.\.\/howto\/maintain-git\.#{ext}/, 'link:../howto/maintain-git.html')
content.gsub!(/link:\.\.\/howto\/maintain-git\.txt/, 'link:../howto/maintain-git.html')
# Handle `gitlink:` mistakes (the last of which was fixed in
# dbf47215e32b (rebase docs: fix "gitlink" typo, 2019-02-27))
content.gsub!(/gitlink:/, "linkgit:")
# Handle erroneous `link:api-trace2.txt`, see 4945f046c7f5 (api docs:
# link to html version of api-trace2, 2022-09-16)
content.gsub!(/link:api-trace2.#{ext}/, 'link:api-trace2.html')
content.gsub!(/link:api-trace2.txt/, 'link:api-trace2.html')
# Handle `linkgit:git-config.txt` mistake, fixed in ad52148a7d0
# (Documentation: fix broken linkgit to git-config, 2016-03-21)
content.gsub!(/linkgit:git-config.#{ext}/, 'linkgit:git-config')
content.gsub!(/linkgit:git-config.txt/, 'linkgit:git-config')
content.gsub!(/link:(?:technical\/)?(\S*?)\.html(\#\S*?)?\[(.*?)\]/m, "link:/docs/\\1\\2[\\3]")

asciidoc = make_asciidoc(content)
Expand Down
Loading