mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-14 00:32:47 +02:00
misc: add command to run prettier on docs (#2102)
* misc: add command to run prettier on docs * Fix GH issue template * Fix tests * Add prettier-docs command to precommit
This commit is contained in:
parent
cfc313d7c7
commit
55e676cb25
141 changed files with 1181 additions and 968 deletions
|
@ -3,9 +3,11 @@
|
|||

|
||||
|
||||
# Don't replace inside fenced codeblock
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
|
||||
### Non-existing Docs
|
||||
|
||||
- [hahaha](hahaha.md)
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
## Repeating Docs
|
||||
|
||||
- [doc1](doc1.md)
|
||||
- [doc2](./doc2.md)
|
||||
- [doc2](./doc2.md)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
- [doc2][doc2]
|
||||
|
||||
## Do not replace this
|
||||
|
||||
```md
|
||||
![image1][image1]
|
||||
```
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
### Relative linking
|
||||
|
||||
- [doc1](../doc2.md)
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
- [doc1](subdir/doc1.md)
|
||||
|
||||
### With hash
|
||||
- [doc2](doc2.md#existing-docs)
|
||||
|
||||
- [doc2](doc2.md#existing-docs)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
### Relative linking
|
||||
|
||||
- [doc1](../doc2.md)
|
||||
|
|
|
@ -6,17 +6,20 @@ exports[`transform nothing 1`] = `
|
|||

|
||||
|
||||
# Don't replace inside fenced codeblock
|
||||
|
||||
\`\`\`md
|
||||

|
||||
\`\`\`
|
||||
|
||||
### Non-existing Docs
|
||||
|
||||
- [hahaha](hahaha.md)
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`transform relative links 1`] = `
|
||||
"### Relative linking
|
||||
|
||||
- [doc1](/docs/doc2)
|
||||
"
|
||||
`;
|
||||
|
@ -31,7 +34,8 @@ exports[`transform to correct links 1`] = `
|
|||
## Repeating Docs
|
||||
|
||||
- [doc1](/docs/doc1)
|
||||
- [doc2](/docs/doc2)"
|
||||
- [doc2](/docs/doc2)
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`transforms absolute links in versioned docs 1`] = `
|
||||
|
@ -40,7 +44,9 @@ exports[`transforms absolute links in versioned docs 1`] = `
|
|||
- [doc1](/docs/1.0.0/subdir/doc1)
|
||||
|
||||
### With hash
|
||||
- [doc2](/docs/1.0.0/doc2#existing-docs)"
|
||||
|
||||
- [doc2](/docs/1.0.0/doc2#existing-docs)
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`transforms reference links 1`] = `
|
||||
|
@ -55,6 +61,7 @@ exports[`transforms reference links 1`] = `
|
|||
- [doc2][doc2]
|
||||
|
||||
## Do not replace this
|
||||
|
||||
\`\`\`md
|
||||
![image1][image1]
|
||||
\`\`\`
|
||||
|
@ -67,6 +74,7 @@ exports[`transforms reference links 1`] = `
|
|||
|
||||
exports[`transforms relative links in versioned docs 1`] = `
|
||||
"### Relative linking
|
||||
|
||||
- [doc1](/docs/1.0.0/doc2)
|
||||
"
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue