forked from prettier/prettier
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't lowercase Markdown link definition labels (prettier#13155)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
- Loading branch information
Showing
11 changed files
with
211 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#### Don't lowercase link references (#13155 by @DerekNonGeneric & @fisker) | ||
|
||
<!-- prettier-ignore --> | ||
```markdown | ||
<!-- Input --> | ||
We now don't strictly follow the release notes format suggested by [Keep a Changelog]. | ||
|
||
[Keep a Changelog]: https://example.com/ | ||
|
||
<!-- Prettier stable --> | ||
We now don't strictly follow the release notes format suggested by [Keep a Changelog]. | ||
|
||
[keep a changelog]: https://example.com/ | ||
<!-- | ||
^^^^^^^^^^^^^^^^^^ lowercased | ||
--> | ||
|
||
<!-- Prettier main --> | ||
<Same as input> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
tests/format/markdown/linkReference/case-and-space/__snapshots__/jsfmt.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`case-and-space.md format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["markdown"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
# \`linkReference\` | ||
[ See \`AsyncGeneratorFunction\` ][ See \`AsyncGeneratorFunction\` ] | ||
# \`imageReference\` | ||
![ See \`AsyncGeneratorFunction\` ][ See \`AsyncGeneratorFunction\` ] | ||
# \`definition\` | ||
[ See \`AsyncGeneratorFunction\` ]: ./index.html | ||
# \`footnoteReference\` | ||
[^See\`AsyncGeneratorFunction\`] | ||
# \`footnoteDefinition\` | ||
[^See\`AsyncGeneratorFunction\`]: ./index.html | ||
=====================================output===================================== | ||
# \`linkReference\` | ||
[ See \`AsyncGeneratorFunction\` ][ See \`AsyncGeneratorFunction\` ] | ||
# \`imageReference\` | ||
![ See \`AsyncGeneratorFunction\` ][ See \`AsyncGeneratorFunction\` ] | ||
# \`definition\` | ||
[ See \`AsyncGeneratorFunction\` ]: ./index.html | ||
# \`footnoteReference\` | ||
[^See\`AsyncGeneratorFunction\`] | ||
# \`footnoteDefinition\` | ||
[^See\`AsyncGeneratorFunction\`]: ./index.html | ||
================================================================================ | ||
`; | ||
|
||
exports[`issue-3835.md format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["markdown"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
[1][Test Text](http://example.com) | ||
=====================================output===================================== | ||
[1][Test Text](http://example.com) | ||
================================================================================ | ||
`; | ||
|
||
exports[`issue-7118.md format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["markdown"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
- see[Link to Foo][master-LinkToFoo] | ||
[master-LinkToFoo]: http://foo.com | ||
Bla bla [PascalCase][] bla. | ||
[PascalCase]: ./PascalCase.md | ||
## [Unreleased] | ||
… | ||
[Unreleased]: https://github.com/username/project/compare/v1.0.0...HEAD | ||
[darktable]: https://www.darktable.org/ | ||
[js;dr]: https://indieweb.org/js;dr | ||
[LinuxFest Northwest]: https://www.linuxfestnorthwest.org/ | ||
[OpenStreetMap]: https://www.openstreetmap.org/about | ||
[SeaGL]: https://seagl.org/ | ||
[uBlock Origin]: https://github.com/gorhill/uBlock | ||
=====================================output===================================== | ||
- see[Link to Foo][master-LinkToFoo] | ||
[master-LinkToFoo]: http://foo.com | ||
Bla bla [PascalCase][] bla. | ||
[PascalCase]: ./PascalCase.md | ||
## [Unreleased] | ||
… | ||
[Unreleased]: https://github.com/username/project/compare/v1.0.0...HEAD | ||
[darktable]: https://www.darktable.org/ | ||
[js;dr]: https://indieweb.org/js;dr | ||
[LinuxFest Northwest]: https://www.linuxfestnorthwest.org/ | ||
[OpenStreetMap]: https://www.openstreetmap.org/about | ||
[SeaGL]: https://seagl.org/ | ||
[uBlock Origin]: https://github.com/gorhill/uBlock | ||
================================================================================ | ||
`; |
19 changes: 19 additions & 0 deletions
19
tests/format/markdown/linkReference/case-and-space/case-and-space.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# `linkReference` | ||
|
||
[ See `AsyncGeneratorFunction` ][ See `AsyncGeneratorFunction` ] | ||
|
||
# `imageReference` | ||
|
||
![ See `AsyncGeneratorFunction` ][ See `AsyncGeneratorFunction` ] | ||
|
||
# `definition` | ||
|
||
[ See `AsyncGeneratorFunction` ]: ./index.html | ||
|
||
# `footnoteReference` | ||
|
||
[^See`AsyncGeneratorFunction`] | ||
|
||
# `footnoteDefinition` | ||
|
||
[^See`AsyncGeneratorFunction`]: ./index.html |
1 change: 1 addition & 0 deletions
1
tests/format/markdown/linkReference/case-and-space/issue-3835.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[1][Test Text](http://example.com) |
18 changes: 18 additions & 0 deletions
18
tests/format/markdown/linkReference/case-and-space/issue-7118.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- see[Link to Foo][master-LinkToFoo] | ||
|
||
[master-LinkToFoo]: http://foo.com | ||
|
||
Bla bla [PascalCase][] bla. | ||
|
||
[PascalCase]: ./PascalCase.md | ||
|
||
## [Unreleased] | ||
… | ||
[Unreleased]: https://github.com/username/project/compare/v1.0.0...HEAD | ||
|
||
[darktable]: https://www.darktable.org/ | ||
[js;dr]: https://indieweb.org/js;dr | ||
[LinuxFest Northwest]: https://www.linuxfestnorthwest.org/ | ||
[OpenStreetMap]: https://www.openstreetmap.org/about | ||
[SeaGL]: https://seagl.org/ | ||
[uBlock Origin]: https://github.com/gorhill/uBlock |
1 change: 1 addition & 0 deletions
1
tests/format/markdown/linkReference/case-and-space/jsfmt.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run_spec(__dirname, ["markdown"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters