Fix section heading link fragments which start with a digit#11811
Fix section heading link fragments which start with a digit#11811ScatteredComet wants to merge 4 commits intogodotengine:masterfrom
Conversation
as per Calinou's suggestion I very well may have missed some
|
From the CI, it looks like including those special characters break the links; I'll remove them. Would be nice to know exactly what characters are allowed though if we're going to define a convention. |
0eceb42 to
da1b748
Compare
|
I tried to look for some specification for valid anchors but didn't manage to find anything, so I just changed all special characters to underscores. |
Changing page anchors will break translations, so I would recommend against this. |
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
|
https://docs.godotengine.org/en/stable/tutorials/io/binary_serialization_api.html#float so I don't think there's anything else that needs to be added to this PR |
I missed come headings before
|
This is a different solution than the contributing docs used e.g. here godotengine/godot-contributing-docs#75 (comment) suggests that this PR might not work |
-,.,/within a custom anchor break them? If so then some of my changes will need amending [Edit: they do, and have been removed]_doc_<page_slug>_<title_slug>:led to non-unique anchors (e.g. inupgrading_to_godot_4.6.rst&docs_changelog.rstwhere headings are used twice) I used_doc_<page_slug>_<section_slug>_<subsection_slug>:binary_serialization_api.rstheadings contain lots of colons: what should we do? [Edit: they are fine as is]I also think it would be a good idea to add something to the contributing docs and/or unit tests saying that you need to provide a custom anchor if you define a title which starts with a number, and define a convention.
Notes on this PR
I used
ripgrepwith the commandsrg -U '^[0-9].*\n-'andrg -U '^[0-9].*\n~'to search for these, which corresponds to searching for [line with a number at the start] + [line break] + [~ or -].I also saw a lot of page anchors which dont align to
from the "writing the manual" page, but I'll make another PR for that as its a large diff.