Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown formatting changes #104

Merged
merged 10 commits into from
Apr 4, 2023
Merged

Conversation

wipash
Copy link
Contributor

@wipash wipash commented Apr 4, 2023

Some markdown visualisation libraries (MkDocs in my case) don't render the table properly if there's no blank line or heading directly before the table. In this case, if a config item has no assignments, the table is inserted on the line directly below the description which causes it to be displayed as raw text rather than a table.

This PR adds a ### Configuration heading before all config_table. Alternatively the heading could be replaced with a simple newline.

Additionally, when using some special characters in descriptions, they can have unforeseen effects on the rendered markdown. If all special characters are escaped, then it removes the risk of this happening. Possibly this is overkill and completely unnecessary, I can remove it if you think so.

almenscorner and others added 10 commits February 8, 2023 12:40
Bug fix - update group not included
Some markdown visualisation libraries don't render the table properly if there's no newline or heading directly before the table. In this case, if a config item has no assignments, the table is inserted on the line directly below the description which can break formatting.
Markdown will fail to render text properly if it contains some combinations of special characters. It's probably unnecessary, but if we escape everything then there's no question about whether it will render properly.

Markdown provides backslash escapes for the following characters:

```
    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
 + plus sign
 - minus sign (hyphen)
    .   dot
    !   exclamation mark
```
Copy link
Owner

@almenscorner almenscorner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good and I like the addition of escaping special characters to prevent strange rendering of the MD.

@almenscorner almenscorner self-assigned this Apr 4, 2023
@almenscorner almenscorner changed the base branch from main to dev April 4, 2023 10:30
@almenscorner almenscorner merged commit 8663f84 into almenscorner:dev Apr 4, 2023
@wipash wipash deleted the doc-formatting branch August 7, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants