-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support Vue Custom Block * Add changelog * Udpate snapshots * Support "type" for json * Remove guessing languages * Modify to reuse inferScriptParser logic * Implement withInnerParts arg for stripTrailingHardline * Rename isVueCustomBlock * Set `verbose: true` * Use getParserName * Ignore vueIndentScriptAndStyle * tmp * Fix formatting * Add tests * Fix by lint * Revert "Set `verbose: true`" This reverts commit f65c7cd. * loop with i-- * Modify to preserve unknown langauge * Support embeddedLanguageFormatting * Fix by lint * Fix mistake * Modify to preserve unknown lang * Remove unnecesary condition * Add error tests Co-authored-by: fisker Cheung <lionkay@gmail.com>
- Loading branch information
1 parent
7b7ca47
commit 915327d
Showing
19 changed files
with
1,860 additions
and
88 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,27 @@ | ||
#### Support custom blocks ([#8023](https://github.com/prettier/prettier/pull/8023) by [@sosukesuzuki](https://github.com/sosukesuzuki)) | ||
|
||
Support [vue-loader custom blocks](https://vue-loader.vuejs.org/guide/custom-blocks.html) in SFC with `lang` attribute. | ||
|
||
<!-- prettier-ignore --> | ||
```html | ||
<!-- Input --> | ||
<custom lang="json"> | ||
{ | ||
"foo": | ||
"bar"} | ||
</custom> | ||
|
||
<!-- Prettier stable --> | ||
<custom lang="json"> | ||
{ | ||
"foo": | ||
"bar"} | ||
</custom> | ||
|
||
<!-- Prettier master --> | ||
<custom lang="json"> | ||
{ | ||
"foo": "bar" | ||
} | ||
</custom> | ||
``` |
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
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
Oops, something went wrong.