prettier-plugin-embed 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/embedded/register.d.ts +31 -31
- package/dist/embedded/utils.d.ts +1 -1
- package/dist/index.js +783 -768
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -991,12 +991,16 @@ Embedded YAML uses the parsers and printers included with Prettier.
|
|
|
991
991
|
- **Default**: `[]`
|
|
992
992
|
- **Description**: Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags.
|
|
993
993
|
|
|
994
|
+
This preserves the original exterior whitespace characters, including their indentation. Without this option, whitespace-sensitive markup such as HTML and Jinja preserves whether boundary whitespace exists and allows its indentation to be formatted.
|
|
995
|
+
|
|
994
996
|
##### `noEmbeddedMultiLineIndentation`
|
|
995
997
|
|
|
996
998
|
- **Type**: `string[]`
|
|
997
999
|
- **Default**: `[]`
|
|
998
1000
|
- **Description**: Turns off auto indentation in the formatting results for the specified comments or tags when they are formatted to span multi lines.
|
|
999
1001
|
|
|
1002
|
+
This removes the extra indentation level added around the embedded content. Indentation within the embedded language is still formatted. For example, `"noEmbeddedMultiLineIndentation": ["html", "jinja"]` disables that extra level for both tags and comments. It can be combined with `preserveEmbeddedExteriorWhitespaces`.
|
|
1003
|
+
|
|
1000
1004
|
##### `embeddedOverrides`
|
|
1001
1005
|
|
|
1002
1006
|
- **Type**: `string`
|
|
@@ -14,34 +14,34 @@ import * as __glob__0_7 from "./graphql/index.js";
|
|
|
14
14
|
import * as __glob__0_8 from "./handlebars/index.js";
|
|
15
15
|
import * as __glob__0_9 from "./html/index.js";
|
|
16
16
|
import * as __glob__0_10 from "./hugo/index.js";
|
|
17
|
-
import * as __glob__0_11 from "./
|
|
18
|
-
import * as __glob__0_12 from "./
|
|
19
|
-
import * as __glob__0_13 from "./
|
|
20
|
-
import * as __glob__0_14 from "./
|
|
21
|
-
import * as __glob__0_15 from "./
|
|
22
|
-
import * as __glob__0_16 from "./
|
|
23
|
-
import * as __glob__0_17 from "./
|
|
24
|
-
import * as __glob__0_18 from "./
|
|
25
|
-
import * as __glob__0_19 from "./
|
|
26
|
-
import * as __glob__0_20 from "./
|
|
27
|
-
import * as __glob__0_21 from "./
|
|
28
|
-
import * as __glob__0_22 from "./
|
|
29
|
-
import * as __glob__0_23 from "./
|
|
30
|
-
import * as __glob__0_24 from "./
|
|
31
|
-
import * as __glob__0_25 from "./
|
|
32
|
-
import * as __glob__0_26 from "./
|
|
33
|
-
import * as __glob__0_27 from "./
|
|
34
|
-
import * as __glob__0_28 from "./
|
|
35
|
-
import * as __glob__0_29 from "./
|
|
36
|
-
import * as __glob__0_30 from "./
|
|
37
|
-
import * as __glob__0_31 from "./
|
|
38
|
-
import * as __glob__0_32 from "./
|
|
39
|
-
import * as __glob__0_33 from "./
|
|
40
|
-
import * as __glob__0_34 from "./
|
|
41
|
-
import * as __glob__0_35 from "./
|
|
42
|
-
import * as __glob__0_36 from "./
|
|
43
|
-
import * as __glob__0_37 from "./
|
|
44
|
-
import * as __glob__0_38 from "./
|
|
45
|
-
import * as __glob__0_39 from "./
|
|
46
|
-
import * as __glob__0_40 from "./
|
|
47
|
-
import * as __glob__0_41 from "./
|
|
17
|
+
import * as __glob__0_11 from "./ini/index.js";
|
|
18
|
+
import * as __glob__0_12 from "./java/index.js";
|
|
19
|
+
import * as __glob__0_13 from "./json/index.js";
|
|
20
|
+
import * as __glob__0_14 from "./jinja/index.js";
|
|
21
|
+
import * as __glob__0_15 from "./jsonata/index.js";
|
|
22
|
+
import * as __glob__0_16 from "./jte/index.js";
|
|
23
|
+
import * as __glob__0_17 from "./latex/index.js";
|
|
24
|
+
import * as __glob__0_18 from "./liquid/index.js";
|
|
25
|
+
import * as __glob__0_19 from "./markdown/index.js";
|
|
26
|
+
import * as __glob__0_20 from "./marko/index.js";
|
|
27
|
+
import * as __glob__0_21 from "./motoko/index.js";
|
|
28
|
+
import * as __glob__0_22 from "./mustache/index.js";
|
|
29
|
+
import * as __glob__0_23 from "./nginx/index.js";
|
|
30
|
+
import * as __glob__0_24 from "./noop/index.js";
|
|
31
|
+
import * as __glob__0_25 from "./nunjucks/index.js";
|
|
32
|
+
import * as __glob__0_26 from "./pegjs/index.js";
|
|
33
|
+
import * as __glob__0_27 from "./php/index.js";
|
|
34
|
+
import * as __glob__0_28 from "./powershell/index.js";
|
|
35
|
+
import * as __glob__0_29 from "./prisma/index.js";
|
|
36
|
+
import * as __glob__0_30 from "./properties/index.js";
|
|
37
|
+
import * as __glob__0_31 from "./pug/index.js";
|
|
38
|
+
import * as __glob__0_32 from "./ruby/index.js";
|
|
39
|
+
import * as __glob__0_33 from "./sh/index.js";
|
|
40
|
+
import * as __glob__0_34 from "./solidity/index.js";
|
|
41
|
+
import * as __glob__0_35 from "./sql/index.js";
|
|
42
|
+
import * as __glob__0_36 from "./svelte/index.js";
|
|
43
|
+
import * as __glob__0_37 from "./toml/index.js";
|
|
44
|
+
import * as __glob__0_38 from "./ts/index.js";
|
|
45
|
+
import * as __glob__0_39 from "./xml/index.js";
|
|
46
|
+
import * as __glob__0_40 from "./xquery/index.js";
|
|
47
|
+
import * as __glob__0_41 from "./yaml/index.js";
|
package/dist/embedded/utils.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function prepareTemplate(node: TemplateLiteral, createPlaceholder
|
|
|
11
11
|
export declare function wrapEmbeddedDoc(contentDoc: Doc, options: {
|
|
12
12
|
preserveEmbeddedExteriorWhitespaces?: string[];
|
|
13
13
|
noEmbeddedMultiLineIndentation?: string[];
|
|
14
|
-
}, commentOrTag: string, leadingWhitespaces: string, trailingWhitespaces: string,
|
|
14
|
+
}, commentOrTag: string, leadingWhitespaces: string, trailingWhitespaces: string, preserveBoundaryWhitespace?: boolean): Doc;
|
|
15
15
|
export declare function printTemplateExpression(path: AstPath<Expression & {
|
|
16
16
|
comments?: Comment[];
|
|
17
17
|
}>, print: InternalPrintFun, templateLiteral: TemplateLiteral, index: number, tabWidth: number, preserveIndentation?: boolean, knownIndentSize?: number): builders.Group;
|