Repository navigation
Replace recommonmark with myst-parser - #136
Conversation
|
With regards to the issues on header levels, I take it that it's generally expected that MD should incrementally increase the header number instead of making jumps? |
Rather than on markdown, that is pretty much expected for all kinds of documents. I don't think it is defined in any real standard, but I have seen linters which will not accept markdown with non-consecutive header levels. It also just doesn't make much sense from a logical perspective. It also doesn't work with both recommonmark or myst-parser, so even if we wanted to do it for aesthetic reasons or whatever, we can't easily do that. |
This replaces the recommonmark markdown parser with myst-parser.
recommonmark is badly supported and will likely be deprecated at the end of this month.
Fixes #128
While it does fix links being parsed incorrectly for translation, the new strings will still contain the wrong translation and only be marked as "fuzzy" indicating that the translation needs to be updated. Translation tools like Weblate will see this fuzzy indicator and mark the translation as outdated and needing attention.
Another concern is that the switch to myst-parser adds 108 new warnings. These warnings are all of the same type and are all valid.
Example:
The warning indicated that the level 2 heading (In this example
## Interface (Codename Athena)) is followed by a level 2 heading (In this example#### General). To do this doesn't really make any sense and may break browser accessibility tools.Recommonmark didn't throw a warning, but also didn't abide to the specified levels. In this example it just parsed the level 4
#### Generalheading as a level 3 heading. GitHub on the other hand does exactly what we say and parses it as a level 4 heading.I assume this was done from a design perspective. Personally I like the smaller section headers more, but that should be changed in the theme and not by resorting to potentially incompatible/illegal behaviour in every markdown file.
A preview is available here: https://data.moto9000.moe/sphinx/PR136/ ( 2d37f9a )
The dependency has been installed on Weblate, so it will be able to immediately update the translation files.