-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
91 additions
and
6 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,5 @@ | ||
--- | ||
'prettier-plugin-zh': minor | ||
--- | ||
|
||
support spaceAroundCode, spaceAroundLink |
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
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,36 @@ | ||
# space-around-code | ||
|
||
🛠️ This rule require configuration. | ||
|
||
🔧 This rule is automatically fixable. | ||
|
||
## 📖 Rule Details | ||
|
||
Place one space before/after inline code block. | ||
|
||
```md | ||
<!-- ✅ Correct --> | ||
|
||
今天使用了 `Vite` 来打包应用 | ||
|
||
<!-- ❌ Incorrect --> | ||
|
||
今天使用了`Vite`来打包应用 | ||
|
||
<!-- 🔧 Fixed --> | ||
|
||
今天使用了 `Vite` 来打包应用 | ||
``` | ||
|
||
## ⚙️ Usage | ||
|
||
```json | ||
{ | ||
"spaceAroundCode": true | ||
} | ||
``` | ||
|
||
- **Type:** `boolean` | ||
- **Default:** `false` | ||
- **Description:** When set to `true`, this option will enable the insertion of spaces around inline | ||
code block. If set to `false`, this feature will be disabled. |
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,39 @@ | ||
# space-around-link | ||
|
||
🛠️ This rule require configuration. | ||
|
||
🔧 This rule is automatically fixable. | ||
|
||
## 📖 Rule Details | ||
|
||
Place one space before/after inline link block. | ||
|
||
```md | ||
<!-- ✅ Correct --> | ||
|
||
查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates) ,里面包含 | ||
各种工具和不同框架的模板。 | ||
|
||
<!-- ❌ Incorrect --> | ||
|
||
查看 Awesome Vite 仓库的[社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含各 | ||
种工具和不同框架的模板。 | ||
|
||
<!-- 🔧 Fixed --> | ||
|
||
查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含 | ||
各种工具和不同框架的模板。 | ||
``` | ||
|
||
## ⚙️ Usage | ||
|
||
```json | ||
{ | ||
"spaceAroundLink": true | ||
} | ||
``` | ||
|
||
- **Type:** `boolean` | ||
- **Default:** `false` | ||
- **Description:** When set to `true`, this option will enable the insertion of spaces around inline | ||
link block. If set to `false`, this feature will be disabled. |
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
4 changes: 3 additions & 1 deletion
4
packages/prettier-plugin-zh/tests/fixtures/space-around-code.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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# space-around-block | ||
|
||
test space-`around`-code-[baidu](www.baidu.com)点击去百度 baidu | ||
test space-`around`-code- [baidu](www.baidu.com) 点击去百度 baidu | ||
|
||
查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含各种工具和不同框架的模板。 |