mongodb / specifications

Specifications related to MongoDB
http://specifications.readthedocs.io/en/latest
Other
389 stars 242 forks source link

DRIVERS-3010 Specs use insufficient markdown indentation for mkdocs #1677

Closed mdbmes closed 3 days ago

mdbmes commented 6 days ago

This is a draft of a fix for DRIVERS-3010, adjusting the indentation of nested lists and code blocks so that mkdocs will render them correctly.

The main fix is to begin using the mdformat-mkdocs plugin for mdformat. Existing documents have been reformatted with an override that allows the generated HTML to change (because it was incorrect before) but future automatic invocations of mdformat will check that any markdown changes don't affect rendered output.

Along the way, I've been finding semi-related formatting problems that were also causing the mkdocs output to be incorrect or hard to read. A handful of incorrect indentations were causing lists to be renumbered. The client side encryption spec relies on math mode, which was unsupported, and other specs entered math mode unintentionally. These cases have been fixed. Indented code blocks are not handled by plain mkdocs without extensions, so a fix to this also became necessary.

This change adds two new external dependencies at build time, imported via pip:

And one new JavaScript library at runtime, via jsdelivr CDN: