fix: links to Anki Manual URLs containing --
#117
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose / Description
Anki Desktop manual has some sections which URLs contain two consecutive hyphens (
--
), but in AnkiDroid manual, the links which should be connected to the URLs actually have different URLs, and as a result the links don't open the sections.https://docs.ankiweb.net/templates/generation.html#card-generation
--deletion
https://docs.ankiweb.net/templates/generation.html#card-generation--deletion
https://docs.ankiweb.net/templates/generation.html#card-generation
-amp-deletion
https://docs.ankiweb.net/templates/generation.html#card-generation-amp-deletion
This commit will replace the different URLs with actual ones.
Fixes
Fixes #116
Approach
Simple replacement from
-amp-
to--
would cause undesirable substitution by AsciiDoc formatting.https://docs.ankiweb.net/templates/generation.html#card-generation
--E2%80%8Bdeletion
https://docs.ankiweb.net/templates/generation.html#card-generation--E2%80%8Bdeletion
To prevent it, the replaced URL will be enclosed between
link:++
and++
Ex. link:++
https://docs.ankiweb.net/templates/generation.html#card-generation--deletion
++Ref: AsciiDoc > Passthroughs > Inline Passthroughs > Single and double plus
https://docs.asciidoctor.org/asciidoc/latest/pass/pass-macro/#single-double-plus
How Has This Been Tested?
Checked the preview screen of manual.asc in this branch
and confirmed that the correct sections are shown by clicking the link texts.