Skip to content

[skip changelog] Prevent Prettier from wrapping nightly download link definitions #901

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

Merged
merged 1 commit into from
Aug 18, 2020
Merged

[skip changelog] Prevent Prettier from wrapping nightly download link definitions #901

merged 1 commit into from
Aug 18, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 18, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce?

Bug fix.

  • What is the current behavior?

Prettier is configured to wrap lines in Markdown files at 120 characters. The reference definitions for the nightly ARM download links happen to be longer than 120 characters, and so get wrapped.

With the modern Markdown specification, this is permitted:
https://spec.commonmark.org/0.29/#link-reference-definitions

A link reference definition consists of a link label, indented up to three spaces, followed by a colon (:), optional whitespace (including up to one line ending), a link destination

but apparently the Python-Markdown renderer used by MkDocs does not support this, so these links are broken.

  • What is the new behavior?

The links are fixed by remove the line breaks added by Prettier and add markup to instruct Prettier to ignore these lines so the auto formatter won't reintroduce the issue:
https://prettier.io/docs/en/ignore.html#markdown

  • Does this PR introduce a breaking change?

No.

Prettier is configured to wrap lines in Markdown files at 120 characters. The reference definitions for the nightly ARM downloads happen to be longer than 120 characters, and so get wrapped.

With the modern Markdown specification, this is permitted:
https://spec.commonmark.org/0.29/#link-reference-definitions

> A link reference definition consists of a link label, indented up to three spaces, followed by a colon (:), optional whitespace (including up to one line ending), a link destination

but apparently the Python-Markdown renderer used by MkDocs does not support this.

The solution is to remove the line breaks and markup to instruct Prettier to ignore these lines:

https://prettier.io/docs/en/ignore.html#markdown
@per1234 per1234 added topic: documentation Related to documentation for the project kind/bug labels Aug 18, 2020
@per1234 per1234 requested a review from silvanocerza August 18, 2020 06:50
@per1234 per1234 merged commit 9c9e25c into arduino:master Aug 18, 2020
@per1234 per1234 deleted the fix-install-links branch August 18, 2020 08:02
@per1234 per1234 self-assigned this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants