Website docs - Markdown to HTML produces abrupt line breaks #10387
Closed
Description
Documentation Issue
Line breaks in the raw Markdown files render abrupt <br>
tags on Payload docs website.
Some examples:
- https://payloadcms.com/docs/fields/relationship#sort-options
- https://payloadcms.com/docs/hooks/fields#beforevalidate
The GitHub Markdown preview handles these line breaks okay without rendering them.
- https://github.com/payloadcms/payload/blob/main/docs/fields/relationship.mdx
- https://github.com/payloadcms/payload/blob/main/docs/hooks/fields.mdx
Additional Details
My first instinct was to track down all of these line breaks in the .mdx
files and simply create a PR that removes them. However, preserving the line breaks could be good for the readability of the raw Markdown.
The alternative would be to adjust the Markdown to HTML conversion on the Payload docs website to take this into account and match GitHub's rendering of line breaks.