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:
Yangshun Tay 2019-12-07 21:56:30 -08:00 committed by GitHub
parent cfc313d7c7
commit 55e676cb25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
141 changed files with 1181 additions and 968 deletions

View file

@ -3,9 +3,11 @@
![image1](assets/image1.png)
# Don't replace inside fenced codeblock
```md
![doc4](doc4.md)
```
### Non-existing Docs
- [hahaha](hahaha.md)

View file

@ -7,4 +7,4 @@
## Repeating Docs
- [doc1](doc1.md)
- [doc2](./doc2.md)
- [doc2](./doc2.md)

View file

@ -9,6 +9,7 @@
- [doc2][doc2]
## Do not replace this
```md
![image1][image1]
```

View file

@ -1,2 +1,3 @@
### Relative linking
- [doc1](../doc2.md)

View file

@ -3,4 +3,5 @@
- [doc1](subdir/doc1.md)
### With hash
- [doc2](doc2.md#existing-docs)
- [doc2](doc2.md#existing-docs)

View file

@ -1,2 +1,3 @@
### Relative linking
- [doc1](../doc2.md)

View file

@ -6,17 +6,20 @@ exports[`transform nothing 1`] = `
![image1](assets/image1.png)
# Don't replace inside fenced codeblock
\`\`\`md
![doc4](doc4.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)
"
`;