-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic prettier support for doc tag
- Loading branch information
1 parent
79f4c94
commit a218331
Showing
4 changed files
with
38 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
packages/prettier-plugin-liquid/src/test/liquid-doc/fixed.liquid
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,9 @@ | ||
It should indent the body | ||
{% doc %} | ||
@param body | ||
{% enddoc %} | ||
|
||
It should not dedent to root | ||
{% doc %} | ||
@param body | ||
{% enddoc %} |
9 changes: 9 additions & 0 deletions
9
packages/prettier-plugin-liquid/src/test/liquid-doc/index.liquid
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,9 @@ | ||
It should indent the body | ||
{% doc %} | ||
@param body | ||
{% enddoc %} | ||
|
||
It should not dedent to root | ||
{% doc %} | ||
@param body | ||
{% enddoc %} |
7 changes: 7 additions & 0 deletions
7
packages/prettier-plugin-liquid/src/test/liquid-doc/index.spec.ts
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,7 @@ | ||
import { test } from 'vitest'; | ||
import { assertFormattedEqualsFixed } from '../test-helpers'; | ||
import * as path from 'path'; | ||
|
||
test('Unit: liquid-doc', async () => { | ||
await assertFormattedEqualsFixed(__dirname); | ||
}); |