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

Docs: clean up markdown files #449

Merged
merged 8 commits into from
Apr 15, 2024
Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 14, 2024

Description

QA/Markdown CS: use consistent header styles

  • Always use the atx style headers (# ...).
  • Use consistent blank lines around headers.
  • No trailing punctuation in headers.
  • Every file should have a header.
  • First header in a file should be an H1.
    Note: the issue templates do not trigger this error as they use frontmatter with a title attribute. However, frontmatter is not supported for pull request templates.

QA/Markdown CS: use consistent list styles

  • Use the same list markers throughout each document.
  • Use consistent sublist indentation: each level should be indented by four spaces.

QA/Markdown CS: no consecutive block quotes

Rationale: Some Markdown parsers will treat two blockquotes separated by one or more blank lines as the same blockquote, while others will treat them as separate blockquotes.

QA/Markdown CS: code block consistency

  • No long lines within code blocks.
    Rationale: to prevent a horizontal scrollbar.
  • All codeblocks should specify the language.

QA/Markdown CS: consistent surrounding pipes for tables

Generally speaking, the "full" table format should always be used - with leading and trailing pipes, but that is a bit awkward for this particular table as a template file like this will typically be edited in a fixed size font, while GH, when using the template to create an issue will use a variable size font.

So, this is a bit of a mix-and-match to, yes, use the full table format, but also make it look reasonable when people edit the table in a new issue.

QA/Markdown CS: various tweaks

  • Code snippets which either look like markdown or could confuse markdown parsers, should be wrapped in backticks.
  • Text in square brackets, which is not a link, should escape the square brackets.
  • Various (tooling) names should use proper case, except when used in code snippets.
    To that end, either fix the case of the term or wrap the code snippet in backticks.
  • No blank line within lists.
  • No trailing spaces.

Note: especially in the CHANGELOG file, there is a lot more text which should be wrapped in backticks, but that's outside the scope of this current PR, which is aimed at one the one hand preventing markdown parsing problems and on the other hand allowing to run an automated Markdownlint check via CI.

QA/Markdown: fix broken link

QA/Markdown: no duplicate links

Suggested changelog entry

N/A

Related issues/external references

Loosely related to #244

* Always use the `atx` style headers (`# ...`).
* Use consistent blank lines around headers.
* No trailing punctuation in headers.
* Every file should have a header.
* First header in a file should be an H1.
   Note: the issue templates do not trigger this error as they use frontmatter with a `title` attribute. However, frontmatter is not supported for pull request templates.
* Use the same list markers throughout each document.
* Use consistent sublist indentation: each level should be indented by four spaces.
> Rationale: Some Markdown parsers will treat two blockquotes separated by one or more blank lines as the same blockquote, while others will treat them as separate blockquotes.
* No long lines within code blocks.
    Rationale: to prevent a horizontal scrollbar.
* All codeblocks should specify the language.
Generally speaking, the "full" table format should always be used - with leading and trailing pipes, but that is a bit awkward for this particular table as a template file like this will typically be edited in a fixed size font, while GH, when using the template to create an issue will use a variable size font.

So, this is a bit of a mix-and-match to, yes, use the full table format, but also make it look reasonable when people edit the table in a new issue.
* Code snippets which either _look like markdown_ or could confuse markdown parsers, should be wrapped in backticks.
* Text in square brackets, which is not a link, should escape the square brackets.
* Various (tooling) names should use proper case, except when used in code snippets.
    To that end, either fix the case of the term or wrap the code snippet in backticks.
* No blank line within lists.
* No trailing spaces.

Note: especially in the CHANGELOG file, there is a lot more text which should be wrapped in backticks, but that's outside the scope of this current PR, which is aimed at one the one hand preventing markdown parsing problems and on the other hand allowing to run an automated Markdownlint check via CI.
@jrfnl jrfnl added this to the 3.9.2 milestone Apr 14, 2024
@jrfnl jrfnl merged commit 8f4eb98 into master Apr 15, 2024
40 checks passed
@jrfnl jrfnl deleted the feature/clean-up-markdown-files branch April 15, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant