Style guide: keep characters out of headings that slug differently - #116
Open
asluk wants to merge 1 commit into
Open
Style guide: keep characters out of headings that slug differently#116asluk wants to merge 1 commit into
asluk wants to merge 1 commit into
Conversation
A heading containing `.`, a maths symbol, `/` or `&` gets a different anchor in the built document than on GitHub, so a cross-reference to it resolves in one and dies in the other. The build reads markdown-hard_line_breaks, which uses Pandoc's own identifier rules; GitHub uses GFM's. Pandoc keeps the full stop, GFM drops it. That is why aousd/core-spec-wg#506's remaining dead link, to a heading reading "Example 4 (implied vs. authored ordering)", resolves on GitHub and is dead in both the DOCX and the HTML. Also records the trap that hid it: verifying an anchor by clicking it on GitHub confirms the GFM form, which is the one the build does not generate.
OleksiyPuzikov
left a comment
Collaborator
There was a problem hiding this comment.
I do not remember exactly why I went with this specific dialect of Markdown in the Pandoc configuration, perhaps there were specific cases that required that.
Do we want to try and convert to GFM format as an input (without converting the files) and see what breaks? Github preview seems rather valuable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds rule 8 to the specification style guide.
A heading containing
., a maths symbol,/or&gets a different anchor in the built document than on GitHub, so a cross-reference to it resolves in one and dies in the other.Example 4 (implied vs. authored ordering)example-4-implied-vs.-authored-orderingexample-4-implied-vs-authored-orderingVersion 1.1.1version-1.1.1version-111Combining (∪)combiningcombining-Paths / referencespaths-referencespaths--referencesThe build reads
markdown-hard_line_breaks, which uses Pandoc's own identifier rules; GitHub uses GFM's. Commas, colons and inline code are safe.This is not hypothetical. aousd/core-spec-wg#506 has one dead cross-reference left, to a heading reading Example 4 (implied vs. authored ordering). It is dead in the DOCX and the HTML and fine on GitHub.
The rule also records the trap that hid it for a week: verifying an anchor by clicking it on GitHub confirms the GFM form, which is the one the build does not generate. The authoritative check is the built DOCX.
Maths symbols are already out by decision — #110.