Fix automated formatting for .mdx files #2942
Labels
good first issue
Good for newcomers
hacktoberfest
pkg: documentation
Changes in the documentation package.
type: quality
Changes to code quality
Context
As part of the Rafiki repository we have our documentation site (built with Astro and styled with Starlight). The docs files are created in markdown.
The problem
The current formatting is making life hard for our docs writers because it wraps tables over multiple lines making them impossible to read, is also giving inconsistent behaviour in terms of enforcing single quotes, and makes elements like the CodeBlock fragile.
Example of issues with markdown tables:
See example discussion:
This:
Which causes the block to render incorrectly.
It should look like this:
But after formatting it looks like this:
The automated formatting passes if additional white space is used around the code ticks but it would be nice not to have a fragile system.
The solution
We've bypassed this by ignoring the documentation folder when applying prettier formatting but it would be nice to have a good formatting system for the markdown files as well. So, we need better mdx friendly formatting rules (with explanations for any specific use cases in the documentation README).
The text was updated successfully, but these errors were encountered: