Socket
Socket
Sign inDemoInstall

prettier-plugin-embed

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-embed - npm Package Compare versions

Comparing version 0.4.5 to 0.4.6

2

dist/embedded/css/options.d.ts

@@ -22,3 +22,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded CSS language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.";
};

@@ -25,0 +25,0 @@ };

@@ -25,3 +25,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded ES language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.";
};

@@ -28,0 +28,0 @@ readonly embeddedEsParser: {

@@ -22,3 +22,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded GLSL language identifiers. This requires \"prettier-plugin-glsl\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.";
};

@@ -25,0 +25,0 @@ };

@@ -21,3 +21,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded GraphQL language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.";
};

@@ -24,0 +24,0 @@ };

@@ -11,3 +11,6 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
declare const HTML_PARSERS: readonly ["html", "vue", "angular", "lwc"];
type HtmlParser = (typeof HTML_PARSERS)[number];
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedHtmlIdentifiers";
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedHtmlParser";
export interface PrettierPluginDepsOptions {

@@ -23,4 +26,14 @@ }

}];
readonly description: "Specify embedded HTML language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.";
};
readonly embeddedHtmlParser: {
category: string;
type: "choice";
default: "html";
description: string;
choices: {
value: "html" | "vue" | "angular" | "lwc";
description: string;
}[];
};
};

@@ -35,2 +48,3 @@ type Options = typeof options;

[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
[EMBEDDED_LANGUAGE_PARSER]?: HtmlParser;
}

@@ -37,0 +51,0 @@ }

@@ -22,3 +22,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded INI language identifiers. This requires \"prettier-plugin-ini\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.";
};

@@ -25,0 +25,0 @@ };

@@ -24,3 +24,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded JSON language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.";
};

@@ -27,0 +27,0 @@ readonly embeddedJsonParser: {

@@ -21,3 +21,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded LaTeX language identifiers. This requires \"prettier-plugin-latex\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.";
};

@@ -24,0 +24,0 @@ };

@@ -23,3 +23,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded Markdown language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.";
};

@@ -26,0 +26,0 @@ };

@@ -13,3 +13,3 @@ import type { EmbeddedDefaultIdentifier } from "../types.js";

}];
readonly description: "Specify embedded language identifiers that will not be formatted.";
readonly description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.";
};

@@ -16,0 +16,0 @@ };

@@ -25,3 +25,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded PHP language identifiers. This requires \"@prettier/plugin-php\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.";
};

@@ -28,0 +28,0 @@ };

@@ -23,3 +23,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded Java Properties language identifiers. This requires \"prettier-plugin-properties\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.";
};

@@ -26,0 +26,0 @@ };

@@ -14,6 +14,6 @@ import type { EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers } from "./types.js";

import * as __glob__0_7 from "./latex/index.js";
import * as __glob__0_8 from "./markdown/index.js";
import * as __glob__0_9 from "./noop/index.js";
import * as __glob__0_10 from "./php/index.js";
import * as __glob__0_11 from "./properties/index.js";
import * as __glob__0_8 from "./noop/index.js";
import * as __glob__0_9 from "./php/index.js";
import * as __glob__0_10 from "./properties/index.js";
import * as __glob__0_11 from "./markdown/index.js";
import * as __glob__0_12 from "./ruby/index.js";

@@ -20,0 +20,0 @@ import * as __glob__0_13 from "./sh/index.js";

@@ -31,3 +31,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded Ruby language identifiers. This requires \"@prettier/plugin-ruby\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.";
};

@@ -34,0 +34,0 @@ readonly embeddedRubyParser: {

import type { ShParserOptions } from "prettier-plugin-sh";
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js";
/**

@@ -12,3 +12,3 @@ * References:

declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedShIdentifiers";
export interface PrettierPluginDepsOptions extends Partial<ShParserOptions> {
export interface PrettierPluginDepsOptions extends Partial<UnionToIntersection<ShParserOptions>> {
}

@@ -23,3 +23,3 @@ export declare const options: {

}];
readonly description: "Specify embedded Shell language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.";
};

@@ -26,0 +26,0 @@ };

@@ -31,3 +31,3 @@ import type { SqlBaseOptions as PrettierPluginSqlOptions } from "prettier-plugin-sql";

}];
readonly description: "Specify embedded SQL language identifiers. This requires \"prettier-plugin-sql\" or \"prettier-plugin-sql-cst\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.";
};

@@ -34,0 +34,0 @@ readonly embeddedSqlPlugin: {

import type { PrettierTaploOptions } from "prettier-plugin-toml";
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js";
/**

@@ -12,3 +12,3 @@ * References:

declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedTomlIdentifiers";
export interface PrettierPluginDepsOptions extends PrettierTaploOptions {
export interface PrettierPluginDepsOptions extends UnionToIntersection<PrettierTaploOptions> {
}

@@ -23,3 +23,3 @@ export declare const options: {

}];
readonly description: "Specify embedded TOML language identifiers. This requires \"prettier-plugin-toml\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.";
};

@@ -26,0 +26,0 @@ };

@@ -25,3 +25,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded TS language parsers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.";
};

@@ -28,0 +28,0 @@ readonly embeddedTsParser: {

@@ -26,3 +26,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded XML language identifiers. This requires \"@prettier/plugin-xml\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.";
};

@@ -39,3 +39,3 @@ /**

}];
readonly description: "This option is read only and used as a workaround to support xml fragments";
readonly description: "This option is read only and is used internally as a workaround to support xml fragments";
};

@@ -42,0 +42,0 @@ };

@@ -21,3 +21,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";

}];
readonly description: "Specify embedded YAML language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.";
};

@@ -24,0 +24,0 @@ };

@@ -5,6 +5,6 @@ import { utils as X, builders as D } from "prettier/doc";

import Ut from "prettier/parser-flow";
import Ct from "prettier/parser-meriyah";
import Wt from "prettier/parser-typescript";
import { printers as Gt } from "prettier/plugins/estree.mjs";
import { readFile as qt } from "node:fs/promises";
import qt from "prettier/parser-meriyah";
import Ct from "prettier/parser-typescript";
import { printers as Wt } from "prettier/plugins/estree.mjs";
import { readFile as Gt } from "node:fs/promises";
import { isAbsolute as zt, dirname as Kt, resolve as Ht, extname as Jt } from "node:path";

@@ -25,3 +25,3 @@ import { Worker as Xt } from "node:worker_threads";

}
function T(t, n, r) {
function L(t, n, r) {
return en(t, (o) => {

@@ -31,5 +31,5 @@ if (typeof o != "string")

const s = [], l = o.split(n);
for (let c = 0; c < l.length; c++) {
let g = l[c];
if (c % 2 == 0) {
for (let a = 0; a < l.length; a++) {
let g = l[a];
if (a % 2 == 0) {
if (!g)

@@ -39,4 +39,4 @@ continue;

} else {
const a = Number(g);
s.push(r[a]);
const c = Number(g);
s.push(r[c]);
}

@@ -73,3 +73,3 @@ }

}
const Y = (() => {
const Q = (() => {
const t = [...Array(26).keys()].map((n) => String.fromCharCode(n + 97)).concat([...Array(10).keys()].map((n) => `${n}`));

@@ -83,4 +83,4 @@ return () => {

})();
function L(t = "p", n = "") {
const r = Y(), e = Y(), o = te(t), s = te(n), l = (g) => `${t}${r}${g}${e}${n}`, c = new RegExp(
function S(t = "p", n = "") {
const r = Q(), e = Q(), o = te(t), s = te(n), l = (g) => `${t}${r}${g}${e}${n}`, a = new RegExp(
`${o}${r}(\\d+)${e}${s}`,

@@ -91,3 +91,3 @@ "ig"

createPlaceholder: l,
placeholderRegex: c
placeholderRegex: a
};

@@ -98,3 +98,3 @@ }

}
function S(t) {
function T(t) {
return `${t}Identifiers`;

@@ -105,6 +105,6 @@ }

}
function V(t) {
function Y(t) {
return `${t}Parser`;
}
const { line: ae, group: P, indent: de, softline: le } = D, on = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
const { line: de, group: O, indent: le, softline: ue } = D, on = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -114,5 +114,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L("@p"), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S("@p"), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -123,20 +123,20 @@ -u.length || void 0

parser: "scss"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return P([
return O([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [P(i)] : de([P(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [O(i)] : le([O(i)]),
u,
"`"
]);
const f = d.length ? ae : le, v = u.length ? ae : le;
return P([
const h = d.length ? de : ue, v = u.length ? de : ue;
return O([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, P(i)] : de([f, P(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, O(i)] : le([h, O(i)]),
v,
"`"
]);
}, pt = "embeddedCss", sn = ["css"], cn = S(pt), an = {
[cn]: {
}, pt = "embeddedCss", sn = ["css"], an = T(pt), cn = {
[an]: {
category: "Embed",

@@ -146,3 +146,3 @@ type: "string",

default: [{ value: [...sn] }],
description: "Specify embedded CSS language identifiers."
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language."
}

@@ -153,4 +153,4 @@ }, dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({

language: pt,
options: an
}, Symbol.toStringTag, { value: "Module" })), { line: ue, group: k, indent: ge, softline: pe } = D, ln = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: cn
}, Symbol.toStringTag, { value: "Module" })), { line: ge, group: P, indent: me, softline: pe } = D, ln = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -160,5 +160,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -169,15 +169,15 @@ -u.length || void 0

parser: e.embeddedEsParser ?? "babel"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return k([
return P([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [k(i)] : ge([k(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [P(i)] : me([P(i)]),
u,
"`"
]);
const f = d.length ? ue : pe, v = u.length ? ue : pe;
return k([
const h = d.length ? ge : pe, v = u.length ? ge : pe;
return P([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, k(i)] : ge([f, k(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, P(i)] : me([h, P(i)]),
v,

@@ -202,4 +202,4 @@ "`"

"meriyah"
], pn = S(ne), mn = V(ne), fn = {
[pn]: {
], mn = T(ne), pn = Y(ne), hn = {
[mn]: {
category: "Embed",

@@ -209,20 +209,20 @@ type: "string",

default: [{ value: [...un] }],
description: "Specify embedded ES language identifiers."
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
},
[mn]: {
[pn]: {
category: "Embed",
type: "choice",
default: "babel",
description: 'Specify the embedded ES language parser. Default is "babel".',
description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
choices: gn.map((t) => ({
value: t,
description: `Use "${t}".`
description: `Use the "${t}" parser.`
}))
}
}, hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: ln,
language: ne,
options: fn
}, Symbol.toStringTag, { value: "Module" })), { line: me, group: N, indent: fe, softline: he } = D, bn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: hn
}, Symbol.toStringTag, { value: "Module" })), { line: he, group: M, indent: fe, softline: be } = D, bn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("prettier-plugin-glsl", e, o), e = {

@@ -232,5 +232,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -241,19 +241,19 @@ -u.length || void 0

parser: "glsl-parser"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return N([
return M([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [N(i)] : fe([N(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [M(i)] : fe([M(i)]),
u,
"`"
]);
const f = d.length ? me : he, v = u.length ? me : he;
return N([
const h = d.length ? he : be, v = u.length ? he : be;
return M([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, N(i)] : fe([f, N(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, M(i)] : fe([h, M(i)]),
v,
"`"
]);
}, mt = "embeddedGlsl", En = ["glsl", "shader"], yn = S(mt), _n = {
}, ht = "embeddedGlsl", En = ["glsl", "shader"], yn = T(ht), _n = {
[yn]: {

@@ -264,3 +264,3 @@ category: "Embed",

default: [{ value: [...En] }],
description: 'Specify embedded GLSL language identifiers. This requires "prettier-plugin-glsl".'
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
}

@@ -270,5 +270,5 @@ }, vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({

embedder: bn,
language: mt,
language: ht,
options: _n
}, Symbol.toStringTag, { value: "Module" })), { line: be, group: M, indent: Ee, softline: ye } = D, $n = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
}, Symbol.toStringTag, { value: "Module" })), { line: Ee, group: N, indent: ye, softline: _e } = D, $n = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -278,5 +278,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -287,19 +287,19 @@ -u.length || void 0

parser: "graphql"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return M([
return N([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [M(i)] : Ee([M(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [N(i)] : ye([N(i)]),
u,
"`"
]);
const f = d.length ? be : ye, v = u.length ? be : ye;
return M([
const h = d.length ? Ee : _e, v = u.length ? Ee : _e;
return N([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, M(i)] : Ee([f, M(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, N(i)] : ye([h, N(i)]),
v,
"`"
]);
}, ft = "embeddedGraphql", In = ["graphql", "gql"], Dn = S(ft), Sn = {
}, ft = "embeddedGraphql", In = ["graphql", "gql"], Dn = T(ft), Tn = {
[Dn]: {

@@ -310,3 +310,3 @@ category: "Embed",

default: [{ value: [...In] }],
description: "Specify embedded GraphQL language identifiers."
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language."
}

@@ -317,4 +317,4 @@ }, xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({

language: ft,
options: Sn
}, Symbol.toStringTag, { value: "Module" })), { line: _e, group: R, indent: ve, softline: $e } = D, { mapDoc: Ln } = X, Tn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: Tn
}, Symbol.toStringTag, { value: "Module" })), { line: ve, group: R, indent: $e, softline: Ie } = D, { mapDoc: Sn } = X, Ln = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -324,5 +324,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -332,19 +332,19 @@ -u.length || void 0

...e,
parser: "html"
}), i = Ln(b, (m) => {
if (typeof m != "string")
return m;
const p = [], h = m.split(g);
for (let $ = 0; $ < h.length; $++) {
let _ = h[$];
parser: e.embeddedHtmlParser ?? "html"
}), i = Sn(b, (p) => {
if (typeof p != "string")
return p;
const m = [], f = p.split(g);
for (let $ = 0; $ < f.length; $++) {
let _ = f[$];
if ($ % 2 == 0) {
if (!_)
continue;
_ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), e.__embeddedInHtml && (_ = _.replaceAll(/<\/(?=script\b)/gi, "<\\/")), p.push(_);
_ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), e.__embeddedInHtml && (_ = _.replaceAll(/<\/(?=script\b)/gi, "<\\/")), m.push(_);
} else {
const I = Number(_);
p.push(E[I]);
m.push(E[I]);
}
}
return p;
return m;
});

@@ -356,27 +356,37 @@ if (e.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [R(i)] : ve([R(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [R(i)] : $e([R(i)]),
u,
"`"
]);
const f = d.length ? _e : $e, v = u.length ? _e : $e;
const h = d.length ? ve : Ie, v = u.length ? ve : Ie;
return R([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, R(i)] : ve([f, R(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, R(i)] : $e([h, R(i)]),
v,
"`"
]);
}, ht = "embeddedHtml", On = ["html", "xhtml"], An = S(ht), Pn = {
[An]: {
}, re = "embeddedHtml", kn = ["html", "xhtml"], An = ["html", "vue", "angular", "lwc"], On = T(re), Pn = Y(re), Mn = {
[On]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...On] }],
description: "Specify embedded HTML language identifiers."
default: [{ value: [...kn] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language."
},
[Pn]: {
category: "Embed",
type: "choice",
default: "html",
description: "The parser used to parse the embedded HTML language.",
choices: An.map((t) => ({
value: t,
description: `Use the "${t}" parser.`
}))
}
}, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Tn,
language: ht,
options: Pn
}, Symbol.toStringTag, { value: "Module" })), { line: Ie, group: F, indent: De, softline: Se } = D, Nn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
embedder: Ln,
language: re,
options: Mn
}, Symbol.toStringTag, { value: "Module" })), { line: De, group: F, indent: Te, softline: xe } = D, Rn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("prettier-plugin-ini", e, o), e = {

@@ -386,5 +396,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -395,3 +405,3 @@ -u.length || void 0

parser: "ini"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -401,27 +411,27 @@ return F([

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [F(i)] : De([F(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [F(i)] : Te([F(i)]),
u,
"`"
]);
const f = d.length ? Ie : Se, v = u.length ? Ie : Se;
const h = d.length ? De : xe, v = u.length ? De : xe;
return F([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, F(i)] : De([f, F(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, F(i)] : Te([h, F(i)]),
v,
"`"
]);
}, bt = "embeddedIni", Mn = ["ini", "cfg", "pro"], Rn = S(bt), Fn = {
[Rn]: {
}, bt = "embeddedIni", Fn = ["ini", "cfg", "pro"], jn = T(bt), wn = {
[jn]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Mn] }],
description: 'Specify embedded INI language identifiers. This requires "prettier-plugin-ini".'
default: [{ value: [...Fn] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
}
}, jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Nn,
embedder: Rn,
language: bt,
options: Fn
}, Symbol.toStringTag, { value: "Module" })), { line: xe, group: j, indent: Le, softline: Te } = D, wn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: wn
}, Symbol.toStringTag, { value: "Module" })), { line: Se, group: j, indent: Le, softline: ke } = D, Un = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -431,5 +441,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = Bn(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = qn(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -440,3 +450,3 @@ -u.length || void 0

parser: e.embeddedJsonParser ?? "json"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -450,6 +460,6 @@ return j([

]);
const f = d.length ? xe : Te, v = u.length ? xe : Te;
const h = d.length ? Se : ke, v = u.length ? Se : ke;
return j([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, j(i)] : Le([f, j(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, j(i)] : Le([h, j(i)]),
v,

@@ -459,4 +469,4 @@ "`"

};
function Bn() {
const t = Y(), n = Y(), r = (o) => `'0${t}${o}${n}'`, e = new RegExp(
function qn() {
const t = Q(), n = Q(), r = (o) => `'0${t}${o}${n}'`, e = new RegExp(
`["']?0${t}(\\d+)${n}['"]?`,

@@ -470,26 +480,26 @@ "ig"

}
const re = "embeddedJson", Un = ["json", "jsonl"], Cn = ["json", "json5", "jsonc", "json-stringify"], Wn = V(re), Gn = S(re), qn = {
[Gn]: {
const oe = "embeddedJson", Cn = ["json", "jsonl"], Wn = ["json", "json5", "jsonc", "json-stringify"], Gn = Y(oe), zn = T(oe), Kn = {
[zn]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Un] }],
description: "Specify embedded JSON language identifiers."
default: [{ value: [...Cn] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language."
},
[Wn]: {
[Gn]: {
category: "Embed",
type: "choice",
default: "json",
description: 'Specify the embedded JSON language parser. Default is "json".',
choices: Cn.map((t) => ({
description: "The parser used to parse the embedded JSON language.",
choices: Wn.map((t) => ({
value: t,
description: `Use "${t}".`
description: `Use the "${t}" parser.`
}))
}
}, zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: wn,
language: re,
options: qn
}, Symbol.toStringTag, { value: "Module" })), { line: Oe, group: w, indent: Ae, softline: Pe } = D, Kn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
embedder: Un,
language: oe,
options: Kn
}, Symbol.toStringTag, { value: "Module" })), { line: Ae, group: w, indent: Oe, softline: Pe } = D, Jn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("prettier-plugin-latex", e, o), e = {

@@ -499,5 +509,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -508,3 +518,3 @@ -u.length || void 0

parser: "latex-parser"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -514,14 +524,14 @@ return w([

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [w(i)] : Ae([w(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [w(i)] : Oe([w(i)]),
u,
"`"
]);
const f = d.length ? Oe : Pe, v = u.length ? Oe : Pe;
const h = d.length ? Ae : Pe, v = u.length ? Ae : Pe;
return w([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, w(i)] : Ae([f, w(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, w(i)] : Oe([h, w(i)]),
v,
"`"
]);
}, Et = "embeddedLatex", Hn = [
}, Et = "embeddedLatex", Xn = [
"latex",

@@ -535,16 +545,16 @@ "tex",

"sty"
], Jn = S(Et), Xn = {
[Jn]: {
], Yn = T(Et), Qn = {
[Yn]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Hn] }],
description: 'Specify embedded LaTeX language identifiers. This requires "prettier-plugin-latex".'
default: [{ value: [...Xn] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
}
}, Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Kn,
embedder: Jn,
language: Et,
options: Xn
}, Symbol.toStringTag, { value: "Module" })), { line: ke, group: B, indent: Ne, softline: Me } = D, Qn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: Qn
}, Symbol.toStringTag, { value: "Module" })), { line: Me, group: B, indent: Ne, softline: Re } = D, Zn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -554,5 +564,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -564,3 +574,3 @@ -u.length || void 0

__inJsTemplate: !0
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -574,24 +584,24 @@ return B([

]);
const f = d.length ? ke : Me, v = u.length ? ke : Me;
const h = d.length ? Me : Re, v = u.length ? Me : Re;
return B([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, B(i)] : Ne([f, B(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, B(i)] : Ne([h, B(i)]),
v,
"`"
]);
}, yt = "embeddedMarkdown", Vn = ["md", "markdown"], Zn = S(yt), er = {
[Zn]: {
}, yt = "embeddedMarkdown", er = ["md", "markdown"], tr = T(yt), nr = {
[tr]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Vn] }],
description: "Specify embedded Markdown language identifiers."
default: [{ value: [...er] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language."
}
}, tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Qn,
embedder: Zn,
language: yt,
options: er
}, Symbol.toStringTag, { value: "Module" })), oe = "embeddedNoop", nr = S(oe), rr = {
[nr]: {
options: nr
}, Symbol.toStringTag, { value: "Module" })), se = "embeddedNoop", or = T(se), sr = {
[or]: {
category: "Embed",

@@ -601,9 +611,9 @@ type: "string",

default: [{ value: [] }],
description: "Specify embedded language identifiers that will not be formatted."
description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
}
}, or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
language: oe,
options: rr
}, Symbol.toStringTag, { value: "Module" })), { line: Re, group: U, indent: Fe, softline: je } = D, sr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
language: se,
options: sr
}, Symbol.toStringTag, { value: "Module" })), { line: Fe, group: U, indent: je, softline: we } = D, ar = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("@prettier/plugin-php", e, o), e = {

@@ -613,5 +623,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L("$p"), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S("$p"), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -622,3 +632,3 @@ -u.length || void 0

parser: "php"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -628,27 +638,27 @@ return U([

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [U(i)] : Fe([U(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [U(i)] : je([U(i)]),
u,
"`"
]);
const f = d.length ? Re : je, v = u.length ? Re : je;
const h = d.length ? Fe : we, v = u.length ? Fe : we;
return U([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, U(i)] : Fe([f, U(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, U(i)] : je([h, U(i)]),
v,
"`"
]);
}, _t = "embeddedPhp", ir = ["php", "php5"], cr = S(_t), ar = {
[cr]: {
}, _t = "embeddedPhp", cr = ["php", "php5"], dr = T(_t), lr = {
[dr]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...ir] }],
description: 'Specify embedded PHP language identifiers. This requires "@prettier/plugin-php".'
default: [{ value: [...cr] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
}
}, dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: sr,
embedder: ar,
language: _t,
options: ar
}, Symbol.toStringTag, { value: "Module" })), { line: we, group: C, indent: Be, softline: Ue } = D, lr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: lr
}, Symbol.toStringTag, { value: "Module" })), { line: Be, group: q, indent: Ue, softline: qe } = D, gr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("prettier-plugin-properties", e, o), e = {

@@ -658,5 +668,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -667,32 +677,32 @@ -u.length || void 0

parser: "dot-properties"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return C([
return q([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [C(i)] : Be([C(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [q(i)] : Ue([q(i)]),
u,
"`"
]);
const f = d.length ? we : Ue, v = u.length ? we : Ue;
return C([
const h = d.length ? Be : qe, v = u.length ? Be : qe;
return q([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, C(i)] : Be([f, C(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, q(i)] : Ue([h, q(i)]),
v,
"`"
]);
}, vt = "embeddedProperties", ur = ["properties"], gr = S(vt), pr = {
[gr]: {
}, vt = "embeddedProperties", mr = ["properties"], pr = T(vt), hr = {
[pr]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...ur] }],
description: 'Specify embedded Java Properties language identifiers. This requires "prettier-plugin-properties".'
default: [{ value: [...mr] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
}
}, mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: lr,
embedder: gr,
language: vt,
options: pr
}, Symbol.toStringTag, { value: "Module" })), { line: Ce, group: W, indent: We, softline: Ge } = D, fr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: hr
}, Symbol.toStringTag, { value: "Module" })), { line: Ce, group: C, indent: We, softline: Ge } = D, br = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("@prettier/plugin-ruby", e, o), e = {

@@ -702,5 +712,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -711,42 +721,42 @@ -u.length || void 0

parser: e.embeddedRubyParser ?? "ruby"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return W([
return C([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [W(i)] : We([W(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [C(i)] : We([C(i)]),
u,
"`"
]);
const f = d.length ? Ce : Ge, v = u.length ? Ce : Ge;
return W([
const h = d.length ? Ce : Ge, v = u.length ? Ce : Ge;
return C([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, W(i)] : We([f, W(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, C(i)] : We([h, C(i)]),
v,
"`"
]);
}, $t = "embeddedRuby", hr = ["ruby"], br = ["ruby", "rbs", "haml"], Er = "embeddedRubyParser", yr = S($t), _r = {
[yr]: {
}, $t = "embeddedRuby", Er = ["ruby"], yr = ["ruby", "rbs", "haml"], _r = "embeddedRubyParser", vr = T($t), $r = {
[vr]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...hr] }],
description: 'Specify embedded Ruby language identifiers. This requires "@prettier/plugin-ruby".'
default: [{ value: [...Er] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
},
[Er]: {
[_r]: {
category: "Embed",
type: "choice",
default: "ruby",
description: 'Specify the embedded Ruby language parser. Default is "ruby".',
choices: br.map((t) => ({
description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
choices: yr.map((t) => ({
value: t,
description: `Use "${t}".`
description: `Use the "${t}" parser.`
}))
}
}, vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: fr,
embedder: br,
language: $t,
options: _r
}, Symbol.toStringTag, { value: "Module" })), { hardline: $r, group: G, line: qe, softline: ze, indent: Ke } = D, { mapDoc: Ir } = X, Dr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: $r
}, Symbol.toStringTag, { value: "Module" })), { hardline: Dr, group: W, line: ze, softline: Ke, indent: He } = D, { mapDoc: Tr } = X, xr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -756,5 +766,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -765,8 +775,8 @@ -u.length || void 0

parser: "sh"
}), i = Ir(b, (m) => {
if (typeof m != "string")
return m;
const p = [], h = m.split(g);
for (let $ = 0; $ < h.length; $++) {
let _ = h[$];
}), i = Tr(b, (p) => {
if (typeof p != "string")
return p;
const m = [], f = p.split(g);
for (let $ = 0; $ < f.length; $++) {
let _ = f[$];
if ($ % 2 == 0) {

@@ -776,27 +786,27 @@ if (!_)

_ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), _.split(/(\n)/).forEach((I) => I === `
` ? p.push($r) : p.push(I));
` ? m.push(Dr) : m.push(I));
} else {
const I = Number(_);
p.push(E[I]);
m.push(E[I]);
}
}
return p;
return m;
});
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return G([
return W([
"`",
d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [G(i)] : Ke([G(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [W(i)] : He([W(i)]),
u,
"`"
]);
const f = d.length ? qe : ze, v = u.length ? qe : ze;
return G([
const h = d.length ? ze : Ke, v = u.length ? ze : Ke;
return W([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, G(i)] : Ke([f, G(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, W(i)] : He([h, W(i)]),
v,
"`"
]);
}, It = "embeddedSh", Sr = ["sh"], xr = S(It), Lr = {
[xr]: {
}, It = "embeddedSh", Sr = ["sh"], Lr = T(It), kr = {
[Lr]: {
category: "Embed",

@@ -806,11 +816,11 @@ type: "string",

default: [{ value: [...Sr] }],
description: "Specify embedded Shell language identifiers."
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
}
}, Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Dr,
embedder: xr,
language: It,
options: Lr
options: kr
}, Symbol.toStringTag, { value: "Module" }));
function He(t, n) {
function Je(t, n) {
var r = Object.keys(t);

@@ -825,8 +835,8 @@ if (Object.getOwnPropertySymbols) {

}
function Je(t) {
function Xe(t) {
for (var n = 1; n < arguments.length; n++) {
var r = arguments[n] != null ? arguments[n] : {};
n % 2 ? He(Object(r), !0).forEach(function(e) {
n % 2 ? Je(Object(r), !0).forEach(function(e) {
Or(t, e, r[e]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : He(Object(r)).forEach(function(e) {
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Je(Object(r)).forEach(function(e) {
Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));

@@ -838,9 +848,9 @@ });

function Or(t, n, r) {
return n = Ar(n), n in t ? Object.defineProperty(t, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = r, t;
return n = Pr(n), n in t ? Object.defineProperty(t, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = r, t;
}
function Ar(t) {
var n = Pr(t, "string");
function Pr(t) {
var n = Mr(t, "string");
return typeof n == "symbol" ? n : String(n);
}
function Pr(t, n) {
function Mr(t, n) {
if (typeof t != "object" || t === null)

@@ -857,5 +867,5 @@ return t;

}
const kr = Dt({});
const Nr = Dt({});
function Dt(t) {
return n.withOptions = (r) => Dt(Je(Je({}, t), r)), n;
return n.withOptions = (r) => Dt(Xe(Xe({}, t), r)), n;
function n(r, ...e) {

@@ -866,11 +876,11 @@ const o = typeof r == "string" ? [r] : r.raw, {

let l = "";
for (let a = 0; a < o.length; a++) {
let d = o[a];
s && (d = d.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), l += d, a < e.length && (l += e[a]);
for (let c = 0; c < o.length; c++) {
let d = o[c];
s && (d = d.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), l += d, c < e.length && (l += e[c]);
}
const c = l.split(`
const a = l.split(`
`);
let g = null;
for (const a of c) {
const d = a.match(/^(\s+)\S+/);
for (const c of a) {
const d = c.match(/^(\s+)\S+/);
if (d) {

@@ -882,4 +892,4 @@ const u = d[1].length;

if (g !== null) {
const a = g;
l = c.map((d) => d[0] === " " || d[0] === " " ? d.slice(a) : d).join(`
const c = g;
l = a.map((d) => d[0] === " " || d[0] === " " ? d.slice(c) : d).join(`
`);

@@ -891,3 +901,3 @@ }

}
const { hardline: Nr, group: q, line: Xe, softline: Ye, indent: Qe } = D, { mapDoc: Mr } = X, Rr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
const { hardline: Rr, group: G, line: Ye, softline: Qe, indent: Ve } = D, { mapDoc: Fr } = X, jr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -899,4 +909,4 @@ ...e,

A(l, e, o);
const { node: c } = r, { createPlaceholder: g, placeholderRegex: a } = L(), d = c.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + g(p)
const { node: a } = r, { createPlaceholder: g, placeholderRegex: c } = S(), d = a.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + g(m)
).join(""), u = d.match(/^\s+/)?.[0] ?? "", y = d.match(/\s+$/)?.[0] ?? "", E = d.slice(

@@ -908,16 +918,16 @@ u.length,

if (l === "prettier-plugin-sql-cst") {
const m = await t(E, {
const p = await t(E, {
...e,
parser: e.embeddedSqlParser ?? "sqlite"
});
i = T(m, a, b);
i = L(p, c, b);
} else {
const m = await t(kr(E), {
const p = await t(Nr(E), {
...e,
parser: "sql"
});
i = Mr(m, (p) => {
if (typeof p != "string")
return p;
const h = [], $ = p.split(a);
i = Fr(p, (m) => {
if (typeof m != "string")
return m;
const f = [], $ = m.split(c);
for (let _ = 0; _ < $.length; _++) {

@@ -929,29 +939,29 @@ let I = $[_];

I = I.replaceAll(/([\\`]|\${)/g, "\\$1"), I.split(/(\n)/).forEach(
(O) => O === `
` ? h.push(Nr) : h.push(O)
(k) => k === `
` ? f.push(Rr) : f.push(k)
);
} else {
const O = Number(I);
h.push(b[O]);
const k = Number(I);
f.push(b[k]);
}
}
return h;
return f;
});
}
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
return q([
return G([
"`",
u,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [q(i)] : Qe([q(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [G(i)] : Ve([G(i)]),
y,
"`"
]);
const f = u.length ? Xe : Ye, v = y.length ? Xe : Ye;
return q([
const h = u.length ? Ye : Qe, v = y.length ? Ye : Qe;
return G([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, q(i)] : Qe([f, q(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, G(i)] : Ve([h, G(i)]),
v,
"`"
]);
}, Z = "embeddedSql", Fr = ["sql"], jr = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], wr = [
}, Z = "embeddedSql", wr = ["sql"], Br = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Ur = [
"sqlite",

@@ -962,36 +972,36 @@ "bigquery",

"postgresql"
], Br = S(Z), Ur = rn(Z), Cr = V(Z), Wr = {
[Br]: {
], qr = T(Z), Cr = rn(Z), Wr = Y(Z), Gr = {
[qr]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Fr] }],
description: 'Specify embedded SQL language identifiers. This requires "prettier-plugin-sql" or "prettier-plugin-sql-cst".'
default: [{ value: [...wr] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
},
[Ur]: {
[Cr]: {
category: "Embed",
type: "choice",
default: "prettier-plugin-sql",
description: 'Specify the Prettier plugin for parsing and formatting SQL. Default is "prettier-plugin-sql"',
choices: jr.map((t) => ({
description: "The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
choices: Br.map((t) => ({
value: t,
description: `Use "${t}".`
description: `Use the "${t}" plugin.`
}))
},
[Cr]: {
[Wr]: {
category: "Embed",
type: "choice",
default: "sqlite",
description: 'Specify the embedded SQL language parser. Default is "sqlite". This option is only for "prettier-plugin-sql-cst".',
choices: wr.map((t) => ({
description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
choices: Ur.map((t) => ({
value: t,
description: `Use "${t}" parser.`
description: `Use the "${t}" parser.`
}))
}
}, Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Rr,
embedder: jr,
language: Z,
options: Wr
}, Symbol.toStringTag, { value: "Module" })), { line: Ve, group: z, indent: Ze, softline: et, hardline: qr } = D, { mapDoc: zr } = X, Kr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
options: Gr
}, Symbol.toStringTag, { value: "Module" })), { line: Ze, group: z, indent: et, softline: tt, hardline: Kr } = D, { mapDoc: Hr } = X, Jr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("prettier-plugin-toml", e, o), e = {

@@ -1001,5 +1011,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -1010,8 +1020,8 @@ -u.length || void 0

parser: "toml"
}), i = zr(b, (m) => {
if (typeof m != "string")
return m;
const p = [], h = m.split(g);
for (let $ = 0; $ < h.length; $++) {
let _ = h[$];
}), i = Hr(b, (p) => {
if (typeof p != "string")
return p;
const m = [], f = p.split(g);
for (let $ = 0; $ < f.length; $++) {
let _ = f[$];
if ($ % 2 == 0) {

@@ -1021,9 +1031,9 @@ if (!_)

_ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), _.split(/(\n)/).forEach((I) => I === `
` ? p.push(qr) : p.push(I));
` ? m.push(Kr) : m.push(I));
} else {
const I = Number(_);
p.push(E[I]);
m.push(E[I]);
}
}
return p;
return m;
});

@@ -1034,27 +1044,27 @@ if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [z(i)] : Ze([z(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [z(i)] : et([z(i)]),
u,
"`"
]);
const f = d.length ? Ve : et, v = u.length ? Ve : et;
const h = d.length ? Ze : tt, v = u.length ? Ze : tt;
return z([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, z(i)] : Ze([f, z(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, z(i)] : et([h, z(i)]),
v,
"`"
]);
}, St = "embeddedToml", Hr = ["toml"], Jr = S(St), Xr = {
[Jr]: {
}, Tt = "embeddedToml", Xr = ["toml"], Yr = T(Tt), Qr = {
[Yr]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Hr] }],
description: 'Specify embedded TOML language identifiers. This requires "prettier-plugin-toml".'
default: [{ value: [...Xr] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
}
}, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Kr,
language: St,
options: Xr
}, Symbol.toStringTag, { value: "Module" })), { line: tt, group: K, indent: nt, softline: rt } = D, Qr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
embedder: Jr,
language: Tt,
options: Qr
}, Symbol.toStringTag, { value: "Module" })), { line: nt, group: K, indent: rt, softline: ot } = D, Zr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -1064,5 +1074,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -1076,3 +1086,3 @@ -u.length || void 0

filepath: void 0
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -1082,37 +1092,37 @@ return K([

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [K(i)] : nt([K(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [K(i)] : rt([K(i)]),
u,
"`"
]);
const f = d.length ? tt : rt, v = u.length ? tt : rt;
const h = d.length ? nt : ot, v = u.length ? nt : ot;
return K([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, K(i)] : nt([f, K(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, K(i)] : rt([h, K(i)]),
v,
"`"
]);
}, se = "embeddedTs", Vr = ["ts", "tsx", "cts", "mts", "typescript"], Zr = ["typescript", "babel-ts"], eo = V(se), to = S(se), no = {
[to]: {
}, ie = "embeddedTs", eo = ["ts", "tsx", "cts", "mts", "typescript"], to = ["typescript", "babel-ts"], no = Y(ie), ro = T(ie), oo = {
[ro]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...Vr] }],
description: "Specify embedded TS language parsers."
default: [{ value: [...eo] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language."
},
[eo]: {
[no]: {
category: "Embed",
type: "choice",
default: "typescript",
description: 'Specify the embedded TS language parser. Default is "typescript".',
choices: Zr.map((t) => ({
description: "The parser used to parse the embedded TypeScript language.",
choices: to.map((t) => ({
value: t,
description: `Use "${t}".`
description: `Use the "${t}" parser.`
}))
}
}, ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: Qr,
language: se,
options: no
}, Symbol.toStringTag, { value: "Module" })), ie = "embeddedXml", { line: ot, group: H, indent: st, softline: ee } = D, oo = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
embedder: Zr,
language: ie,
options: oo
}, Symbol.toStringTag, { value: "Module" })), ae = "embeddedXml", { line: st, group: H, indent: it, softline: ee } = D, io = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
A("@prettier/plugin-xml", e, o), e = {

@@ -1122,5 +1132,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(p, h, { length: $ }) => h === $ - 1 ? p.value.cooked : p.value.cooked + c(h)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(m, f, { length: $ }) => f === $ - 1 ? m.value.cooked : m.value.cooked + a(f)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -1131,4 +1141,4 @@ -u.length || void 0

for (; i !== void 0; ) {
const p = y.slice(i);
if (p.length === 0)
const m = y.slice(i);
if (m.length === 0)
break;

@@ -1139,10 +1149,10 @@ i > 0 && e.xmlWhitespaceSensitivity !== "strict" && b.push(ee), e.__embeddedXmlFragmentRecoverIndex?.splice(

);
let h = await t(p, {
let f = await t(m, {
...e,
parser: ie
parser: ae
});
const [$, _] = e.__embeddedXmlFragmentRecoverIndex ?? [];
$ === void 0 ? i = void 0 : _ === void 0 ? i += $ : (h = p.slice($, _ + 1), i += _ + 1), b.push(h);
$ === void 0 ? i = void 0 : _ === void 0 ? i += $ : (f = m.slice($, _ + 1), i += _ + 1), b.push(f);
}
const f = T(b, g, E);
const h = L(b, g, E);
if (e.xmlWhitespaceSensitivity === "strict" || e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -1152,20 +1162,20 @@ return H([

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [H(f)] : st([H(f)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [H(h)] : it([H(h)]),
u,
"`"
]);
const v = d.length ? ot : ee, m = u.length ? ot : ee;
const v = d.length ? st : ee, p = u.length ? st : ee;
return H([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [v, H(f)] : st([v, H(f)]),
m,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [v, H(h)] : it([v, H(h)]),
p,
"`"
]);
}, so = ["xml", "opml", "rss", "svg"], io = S(ie), co = {
[io]: {
}, ao = ["xml", "opml", "rss", "svg"], co = T(ae), lo = {
[co]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...so] }],
description: 'Specify embedded XML language identifiers. This requires "@prettier/plugin-xml".'
default: [{ value: [...ao] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
},

@@ -1180,6 +1190,6 @@ /**

default: [{ value: [] }],
description: "This option is read only and used as a workaround to support xml fragments"
description: "This option is read only and is used internally as a workaround to support xml fragments"
}
};
function ao(t) {
function uo(t) {
const n = {

@@ -1204,3 +1214,3 @@ loc: {

}
function it(t) {
function at(t) {
const n = {

@@ -1225,3 +1235,3 @@ loc: {

}
const lo = {
const go = {
async parse(t, n) {

@@ -1231,12 +1241,12 @@ const { parse: r } = await import("@xml-tools/parser"), { lexErrors: e, parseErrors: o, cst: s } = r(t);

const l = e[0];
throw ao(l);
throw uo(l);
}
if (o.length > 0) {
let l = !1;
for (const c of o) {
for (const a of o) {
if (!["MismatchedTokenException", "NotAllInputParsedException"].includes(
c.name
a.name
))
throw it(c);
if (c.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
throw at(a);
if (a.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
l = !0;

@@ -1246,8 +1256,8 @@ continue;

if (/Expecting token of type --> EOF <-- but found --> '[\s\S]+' <--/.test(
c.message
) || /Redundant input, expecting EOF but found: /.test(c.message)) {
a.message
) || /Redundant input, expecting EOF but found: /.test(a.message)) {
n.__embeddedXmlFragmentRecoverIndex?.splice(
0,
n.__embeddedXmlFragmentRecoverIndex.length,
c.token.startOffset
a.token.startOffset
);

@@ -1257,5 +1267,5 @@ break;

if (/Expecting token of type --> OPEN <-- but found --> '[\s\S]+' <--/.test(
c.message
a.message
)) {
if (c.token.endOffset === void 0 || Number.isNaN(c.token.endOffset))
if (a.token.endOffset === void 0 || Number.isNaN(a.token.endOffset))
break;

@@ -1265,8 +1275,8 @@ n.__embeddedXmlFragmentRecoverIndex?.splice(

n.__embeddedXmlFragmentRecoverIndex.length,
c.token.startOffset,
c.token.endOffset
a.token.startOffset,
a.token.endOffset
), l = !0;
break;
}
throw it(c);
throw at(a);
}

@@ -1291,3 +1301,3 @@ l && xt(s);

const s = e[o];
if (uo(s)) {
if (mo(s)) {
if (Object.keys(s.children).length === 0) {

@@ -1302,12 +1312,12 @@ e.splice(o, 1), e.length === 0 && delete n[r];

}
function uo(t) {
function mo(t) {
return "name" in t && "children" in t && "location" in t;
}
const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
const po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: oo,
language: ie,
options: co,
parser: lo
}, Symbol.toStringTag, { value: "Module" })), { line: ct, group: J, indent: at, softline: dt } = D, po = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
embedder: io,
language: ae,
options: lo,
parser: go
}, Symbol.toStringTag, { value: "Module" })), { line: ct, group: J, indent: dt, softline: lt } = D, ho = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
e = {

@@ -1317,5 +1327,5 @@ ...e,

};
const { node: l } = r, { createPlaceholder: c, placeholderRegex: g } = L(), a = l.quasis.map(
(m, p, { length: h }) => p === h - 1 ? m.value.cooked : m.value.cooked + c(p)
).join(""), d = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
(p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
d.length,

@@ -1326,3 +1336,3 @@ -u.length || void 0

parser: "yaml"
}), i = T(b, g, E);
}), i = L(b, g, E);
if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))

@@ -1332,53 +1342,53 @@ return J([

d,
e.noEmbeddedMultiLineIndentation?.includes(o) ? [J(i)] : at([J(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [J(i)] : dt([J(i)]),
u,
"`"
]);
const f = d.length ? ct : dt, v = u.length ? ct : dt;
const h = d.length ? ct : lt, v = u.length ? ct : lt;
return J([
"`",
e.noEmbeddedMultiLineIndentation?.includes(o) ? [f, J(i)] : at([f, J(i)]),
e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, J(i)] : dt([h, J(i)]),
v,
"`"
]);
}, Lt = "embeddedYaml", mo = ["yaml", "yml"], fo = S(Lt), ho = {
[fo]: {
}, St = "embeddedYaml", fo = ["yaml", "yml"], bo = T(St), Eo = {
[bo]: {
category: "Embed",
type: "string",
array: !0,
default: [{ value: [...mo] }],
description: "Specify embedded YAML language identifiers."
default: [{ value: [...fo] }],
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language."
}
}, bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
}, yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
embedder: po,
language: Lt,
options: ho
}, Symbol.toStringTag, { value: "Module" })), Tt = [], Ot = {}, At = {}, Pt = {}, Eo = /* @__PURE__ */ Object.assign({
embedder: ho,
language: St,
options: Eo
}, Symbol.toStringTag, { value: "Module" })), Lt = [], kt = {}, At = {}, Ot = {}, _o = /* @__PURE__ */ Object.assign({
"./css/index.ts": dn,
"./es/index.ts": hn,
"./es/index.ts": fn,
"./glsl/index.ts": vn,
"./graphql/index.ts": xn,
"./html/index.ts": kn,
"./ini/index.ts": jn,
"./json/index.ts": zn,
"./latex/index.ts": Yn,
"./markdown/index.ts": tr,
"./noop/index.ts": or,
"./php/index.ts": dr,
"./properties/index.ts": mr,
"./ruby/index.ts": vr,
"./sh/index.ts": Tr,
"./sql/index.ts": Gr,
"./toml/index.ts": Yr,
"./ts/index.ts": ro,
"./xml/index.ts": go,
"./yaml/index.ts": bo
"./html/index.ts": Nn,
"./ini/index.ts": Bn,
"./json/index.ts": Hn,
"./latex/index.ts": Vn,
"./markdown/index.ts": rr,
"./noop/index.ts": ir,
"./php/index.ts": ur,
"./properties/index.ts": fr,
"./ruby/index.ts": Ir,
"./sh/index.ts": Ar,
"./sql/index.ts": zr,
"./toml/index.ts": Vr,
"./ts/index.ts": so,
"./xml/index.ts": po,
"./yaml/index.ts": yo
});
Object.values(Eo).forEach(({ language: t, parser: n, embedder: r, options: e }) => {
nn(Tt, t, oe), n && (Ot[t] = n), r && (At[t] = r), Object.assign(Pt, e);
Object.values(_o).forEach(({ language: t, parser: n, embedder: r, options: e }) => {
nn(Lt, t, se), n && (kt[t] = n), r && (At[t] = r), Object.assign(Ot, e);
});
const yo = "noEmbeddedIdentificationByComment", _o = "noEmbeddedIdentificationByTag", vo = "preserveEmbeddedExteriorWhitespaces", $o = "noEmbeddedMultiLineIndentation", Io = "embeddedOverrides", Vo = {
...Pt,
[yo]: {
const vo = "noEmbeddedIdentificationByComment", $o = "noEmbeddedIdentificationByTag", Io = "preserveEmbeddedExteriorWhitespaces", Do = "noEmbeddedMultiLineIndentation", To = "embeddedOverrides", es = {
...Ot,
[vo]: {
category: "Embed",

@@ -1388,5 +1398,5 @@ type: "string",

default: [{ value: [] }],
description: 'This option turns off "/* identifier */ `...`" comment-based language identification for the specified identifiers.'
description: "Turns off `` /* identifier */ `...` `` comment-based embedded language identification for the specified identifiers."
},
[_o]: {
[$o]: {
category: "Embed",

@@ -1396,5 +1406,5 @@ type: "string",

default: [{ value: [] }],
description: 'This option turns off "identifier`...`" tag-based language identification for the specified identifiers.'
description: "Turns off `` identifier`...` `` tag-based embedded language identification for the specified identifiers."
},
[vo]: {
[Io]: {
category: "Embed",

@@ -1404,5 +1414,5 @@ type: "string",

default: [{ value: [] }],
description: "This option preserves leading and trailing whitespaces in the formatting results for the specified identifiers."
description: "Preserves leading and trailing whitespaces in the formatting results for the specified identifiers."
},
[$o]: {
[Do]: {
category: "Embed",

@@ -1412,5 +1422,5 @@ type: "string",

default: [{ value: [] }],
description: "This option turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines."
description: "Turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines."
},
[Io]: {
[To]: {
category: "Embed",

@@ -1420,5 +1430,5 @@ type: "string",

default: void 0,
description: "This option accepts option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file."
description: "Option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file."
}
}, lt = {
}, ut = {
// parsers from internal

@@ -1428,8 +1438,8 @@ ...wt.parsers,

...Ut.parsers,
...Wt.parsers,
...Ct.parsers,
...qt.parsers,
// parsers from this plugin
...Ot
...kt
};
var Do = {
var xo = {
isEqual: !0,

@@ -1444,19 +1454,19 @@ isMatchingKey: !0,

}, So = Array.prototype.slice;
function Q(t) {
function V(t) {
var n = t.length;
return n ? n === 1 ? [t[0]] : n === 2 ? [t[0], t[1]] : n === 3 ? [t[0], t[1], t[2]] : So.call(t, 0) : [];
}
function xo(t) {
function Lo(t) {
var n = {};
for (var r in t)
Do[r] || (n[r] = t[r]);
xo[r] || (n[r] = t[r]);
return n;
}
function Lo(t) {
function ko(t) {
return typeof t == "function" && t.isMemoized;
}
function To(t, n) {
function Ao(t, n) {
return t === n || t !== t && n !== n;
}
function ut(t, n) {
function gt(t, n) {
var r = {};

@@ -1494,5 +1504,5 @@ for (var e in t)

return {
keys: Q(this.keys),
keys: V(this.keys),
size: this.size,
values: Q(this.values)
values: V(this.values)
};

@@ -1509,5 +1519,5 @@ },

if (o > 1) {
for (var c = 1; c < l; c++)
if (e(s[c], n))
return c;
for (var a = 1; a < l; a++)
if (e(s[a], n))
return a;
}

@@ -1521,9 +1531,9 @@ return -1;

return this._getKeyIndexForSingle(n);
var s = n.length, l, c;
var s = n.length, l, a;
if (s > 1) {
for (var g = 0; g < o; g++)
if (l = e[g], l.length === s) {
for (c = 0; c < s && r(l[c], n[c]); c++)
for (a = 0; a < s && r(l[a], n[a]); a++)
;
if (c === s)
if (a === s)
return g;

@@ -1552,4 +1562,4 @@ }

}, t.prototype.orderByLru = function(n, r, e) {
for (var o = this.keys, s = this.values, l = o.length, c = e; c--; )
o[c + 1] = o[c], s[c + 1] = s[c];
for (var o = this.keys, s = this.values, l = o.length, a = e; a--; )
o[a + 1] = o[a], s[a + 1] = s[a];
o[0] = n, s[0] = r;

@@ -1559,8 +1569,8 @@ var g = this.options.maxSize;

}, t.prototype.updateAsyncCache = function(n) {
var r = this, e = this.options, o = e.onCacheChange, s = e.onCacheHit, l = this.keys[0], c = this.values[0];
this.values[0] = c.then(function(g) {
var r = this, e = this.options, o = e.onCacheChange, s = e.onCacheHit, l = this.keys[0], a = this.values[0];
this.values[0] = a.then(function(g) {
return r.shouldUpdateOnHit && s(r, r.options, n), r.shouldUpdateOnChange && o(r, r.options, n), g;
}, function(g) {
var a = r.getKeyIndex(l);
throw a !== -1 && (r.keys.splice(a, 1), r.values.splice(a, 1)), g;
var c = r.getKeyIndex(l);
throw c !== -1 && (r.keys.splice(c, 1), r.values.splice(c, 1)), g;
});

@@ -1570,8 +1580,8 @@ }, t;

);
function kt(t, n) {
if (n === void 0 && (n = {}), Lo(t))
return kt(t.fn, ut(t.options, n));
function Pt(t, n) {
if (n === void 0 && (n = {}), ko(t))
return Pt(t.fn, gt(t.options, n));
if (typeof t != "function")
throw new TypeError("You must pass a function to `memoize`.");
var r = n.isEqual, e = r === void 0 ? To : r, o = n.isMatchingKey, s = n.isPromise, l = s === void 0 ? !1 : s, c = n.maxSize, g = c === void 0 ? 1 : c, a = n.onCacheAdd, d = n.onCacheChange, u = n.onCacheHit, y = n.transformKey, E = ut({
var r = n.isEqual, e = r === void 0 ? Ao : r, o = n.isMatchingKey, s = n.isPromise, l = s === void 0 ? !1 : s, a = n.maxSize, g = a === void 0 ? 1 : a, c = n.onCacheAdd, d = n.onCacheChange, u = n.onCacheHit, y = n.transformKey, E = gt({
isEqual: e,

@@ -1581,23 +1591,23 @@ isMatchingKey: o,

maxSize: g,
onCacheAdd: a,
onCacheAdd: c,
onCacheChange: d,
onCacheHit: u,
transformKey: y
}, xo(n)), b = new Oo(E), i = b.keys, f = b.values, v = b.canTransformKey, m = b.shouldCloneArguments, p = b.shouldUpdateOnAdd, h = b.shouldUpdateOnChange, $ = b.shouldUpdateOnHit, _ = function() {
var I = m ? Q(arguments) : arguments;
}, Lo(n)), b = new Oo(E), i = b.keys, h = b.values, v = b.canTransformKey, p = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, f = b.shouldUpdateOnChange, $ = b.shouldUpdateOnHit, _ = function() {
var I = p ? V(arguments) : arguments;
v && (I = y(I));
var O = i.length ? b.getKeyIndex(I) : -1;
if (O !== -1)
$ && u(b, E, _), O && (b.orderByLru(i[O], f[O], O), h && d(b, E, _));
var k = i.length ? b.getKeyIndex(I) : -1;
if (k !== -1)
$ && u(b, E, _), k && (b.orderByLru(i[k], h[k], k), f && d(b, E, _));
else {
var Ft = t.apply(this, arguments), jt = m ? I : Q(arguments);
b.orderByLru(jt, Ft, i.length), l && b.updateAsyncCache(_), p && a(b, E, _), h && d(b, E, _);
var Ft = t.apply(this, arguments), jt = p ? I : V(arguments);
b.orderByLru(jt, Ft, i.length), l && b.updateAsyncCache(_), m && c(b, E, _), f && d(b, E, _);
}
return f[0];
return h[0];
};
return _.cache = b, _.fn = t, _.isMemoized = !0, _.options = E, _;
}
async function gt(t) {
async function mt(t) {
try {
const n = await qt(t, { encoding: "utf-8" });
const n = await Gt(t, { encoding: "utf-8" });
return JSON.parse(n);

@@ -1607,8 +1617,8 @@ } catch {

}
const Ao = /* @__PURE__ */ new URL(
const Po = /* @__PURE__ */ new URL(
"data:text/javascript," + encodeURIComponent('import{pathToFileURL as r}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:o})=>{try{const e=await import(r(o).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')
);
async function Po(t) {
async function Mo(t) {
return new Promise((n) => {
const r = new Xt(Ao, {
const r = new Xt(Po, {
workerData: {

@@ -1625,3 +1635,3 @@ absolutePath: t

}
async function ko(t) {
async function No(t) {
console.error(

@@ -1631,3 +1641,3 @@ "Ts module type embeddedOverrides has not been implemented yet."

}
const No = kt(
const Ro = Pt(
async (t, n) => {

@@ -1640,4 +1650,4 @@ if (zt(t))

}
), Mo = async (t, n) => {
const r = No(
), Fo = async (t, n) => {
const r = Ro(
t,

@@ -1647,3 +1657,3 @@ n

if (e === ".json") {
const o = await r, s = await gt(o);
const o = await r, s = await mt(o);
if (s !== void 0)

@@ -1654,3 +1664,3 @@ return s;

} else if (e === ".mjs" || e === ".cjs" || e === ".js") {
const o = await r, s = await Po(o);
const o = await r, s = await Mo(o);
if (s !== void 0)

@@ -1661,3 +1671,3 @@ return s;

} else if (e === ".mts" || e === ".cts" || e === ".ts") {
const o = await r, s = await ko();
const o = await r, s = await No();
if (s !== void 0)

@@ -1668,3 +1678,3 @@ return s;

} else if (e === "") {
const o = await r, s = await gt(o);
const o = await r, s = await mt(o);
if (s !== void 0)

@@ -1678,6 +1688,6 @@ return s;

}
}, Ro = async (t, n, r) => {
}, jo = async (t, n, r) => {
if (t === void 0)
return;
const e = await Mo(
const e = await Fo(
t,

@@ -1695,3 +1705,3 @@ r

};
function Fo({ node: t, parent: n }, r, e) {
function wo({ node: t, parent: n }, r, e) {
if (r.length === 0 || t.type !== "TemplateLiteral")

@@ -1713,11 +1723,11 @@ return;

const l = e.noEmbeddedIdentificationByComment ?? [];
for (const c of r)
if (!l.includes(c) && ` ${c} ` === s.value)
return c;
for (const a of r)
if (!l.includes(a) && ` ${a} ` === s.value)
return a;
}
function jo({ node: t, parent: n }, r, e) {
function Bo({ node: t, parent: n }, r, e) {
if (r.length === 0 || t.type !== "TemplateLiteral" || n?.type !== "TaggedTemplateExpression")
return;
e.parser;
const o = e.parser in lt, s = e.noEmbeddedIdentificationByTag ?? [], l = /* @__PURE__ */ new Set([
const o = e.parser in ut, s = e.noEmbeddedIdentificationByTag ?? [], l = /* @__PURE__ */ new Set([
"start",

@@ -1731,7 +1741,7 @@ "end",

]);
for (const c of r)
if (!s.includes(c))
if (wo(c)) {
if (n.tag.type === "Identifier" && n.tag.name === c)
return c;
for (const a of r)
if (!s.includes(a))
if (Uo(a)) {
if (n.tag.type === "Identifier" && n.tag.name === a)
return a;
} else {

@@ -1742,4 +1752,4 @@ if (!o)

try {
const d = lt[e.parser].parse(
`${c}\`\``,
const d = ut[e.parser].parse(
`${a}\`\``,
e

@@ -1757,14 +1767,14 @@ );

continue;
const a = g.body[0]?.expression;
if (a?.type !== "TaggedTemplateExpression")
const c = g.body[0]?.expression;
if (c?.type !== "TaggedTemplateExpression")
continue;
if (n.tag, a.tag, Mt(n.tag, a.tag, l))
return c;
if (n.tag, c.tag, Nt(n.tag, c.tag, l))
return a;
}
}
function wo(t) {
function Uo(t) {
return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(t);
}
function Nt(t, n, r = /* @__PURE__ */ new Set()) {
return Object.is(t, n) ? !0 : Array.isArray(t) ? Bo(t, n, r) : typeof t == "object" ? Mt(
function Mt(t, n, r = /* @__PURE__ */ new Set()) {
return Object.is(t, n) ? !0 : Array.isArray(t) ? qo(t, n, r) : typeof t == "object" ? Nt(
t,

@@ -1775,3 +1785,3 @@ n,

}
function Bo(t, n, r = /* @__PURE__ */ new Set()) {
function qo(t, n, r = /* @__PURE__ */ new Set()) {
const e = t.length;

@@ -1781,21 +1791,21 @@ if (e != n.length)

for (let o = 0; o < e; o++)
if (!Nt(t[o], n[o], r))
if (!Mt(t[o], n[o], r))
return !1;
return !0;
}
function Mt(t, n, r = /* @__PURE__ */ new Set()) {
function Nt(t, n, r = /* @__PURE__ */ new Set()) {
for (const e of Object.keys(t))
if (!r.has(e) && !(Object.prototype.hasOwnProperty.call(n, e) && Nt(t[e], n[e], r)))
if (!r.has(e) && !(Object.prototype.hasOwnProperty.call(n, e) && Mt(t[e], n[e], r)))
return !1;
return !0;
}
const { estree: Rt } = Gt, Uo = function(t, n) {
const { estree: Rt } = Wt, Co = function(t, n) {
const { node: r } = t;
if (r.type !== "TemplateLiteral" || r.quasis.some(({ value: { cooked: e } }) => e === null))
return null;
for (const e of Tt) {
const o = n[S(e)];
for (const e of Lt) {
const o = n[T(e)];
if (!o)
continue;
const s = Fo(t, o, n) ?? jo(t, o, n);
const s = wo(t, o, n) ?? Bo(t, o, n);
if (s === void 0)

@@ -1806,5 +1816,5 @@ continue;

return null;
const c = t.node;
return c.quasis.length === 1 && c.quasis[0]?.value.raw.trim() === "" ? "``" : async (g, a, d, u) => {
const y = await Ro(
const a = t.node;
return a.quasis.length === 1 && a.quasis[0]?.value.raw.trim() === "" ? "``" : async (g, c, d, u) => {
const y = await jo(
u.embeddedOverrides,

@@ -1815,3 +1825,3 @@ s,

try {
const E = await l(g, a, d, u, {
const E = await l(g, c, d, u, {
identifier: s,

@@ -1831,6 +1841,6 @@ identifiers: o,

return Rt.embed?.(t, n) ?? null;
}, Zo = {
}, ts = {
estree: {
...Rt,
embed: Uo
embed: Co
}

@@ -1840,9 +1850,9 @@ };

At as embeddedEmbedders,
Tt as embeddedLanguages,
Pt as embeddedOptions,
Ot as embeddedParsers,
S as makeIdentifiersOptionName,
Vo as options,
lt as parsers,
Zo as printers
Lt as embeddedLanguages,
Ot as embeddedOptions,
kt as embeddedParsers,
T as makeIdentifiersOptionName,
es as options,
ut as parsers,
ts as printers
};

@@ -16,3 +16,3 @@ import { type AutocompleteStringList, type EmbeddedDefaultIdentifier, type PrettierPluginEmbedOptions } from "./embedded/index.js";

}];
readonly description: "This option turns off \"/* identifier */ `...`\" comment-based language identification for the specified identifiers.";
readonly description: "Turns off `` /* identifier */ `...` `` comment-based embedded language identification for the specified identifiers.";
};

@@ -26,3 +26,3 @@ readonly noEmbeddedIdentificationByTag: {

}];
readonly description: "This option turns off \"identifier`...`\" tag-based language identification for the specified identifiers.";
readonly description: "Turns off `` identifier`...` `` tag-based embedded language identification for the specified identifiers.";
};

@@ -36,3 +36,3 @@ readonly preserveEmbeddedExteriorWhitespaces: {

}];
readonly description: "This option preserves leading and trailing whitespaces in the formatting results for the specified identifiers.";
readonly description: "Preserves leading and trailing whitespaces in the formatting results for the specified identifiers.";
};

@@ -46,3 +46,3 @@ readonly noEmbeddedMultiLineIndentation: {

}];
readonly description: "This option turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines.";
readonly description: "Turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines.";
};

@@ -54,3 +54,3 @@ readonly embeddedOverrides: {

readonly default: undefined;
readonly description: "This option accepts option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file.";
readonly description: "Option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file.";
};

@@ -64,3 +64,3 @@ readonly embeddedNoopIdentifiers: {

}];
readonly description: "Specify embedded language identifiers that will not be formatted.";
readonly description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.";
};

@@ -74,3 +74,3 @@ readonly embeddedCssIdentifiers: {

}];
readonly description: "Specify embedded CSS language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.";
};

@@ -84,3 +84,3 @@ readonly embeddedEsIdentifiers: {

}];
readonly description: "Specify embedded ES language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.";
};

@@ -104,3 +104,3 @@ readonly embeddedEsParser: {

}];
readonly description: "Specify embedded GLSL language identifiers. This requires \"prettier-plugin-glsl\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.";
};

@@ -114,3 +114,3 @@ readonly embeddedGraphqlIdentifiers: {

}];
readonly description: "Specify embedded GraphQL language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.";
};

@@ -124,4 +124,14 @@ readonly embeddedHtmlIdentifiers: {

}];
readonly description: "Specify embedded HTML language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.";
};
readonly embeddedHtmlParser: {
category: string;
type: "choice";
default: "html";
description: string;
choices: {
value: "html" | "vue" | "angular" | "lwc";
description: string;
}[];
};
readonly embeddedIniIdentifiers: {

@@ -134,3 +144,3 @@ readonly category: "Embed";

}];
readonly description: "Specify embedded INI language identifiers. This requires \"prettier-plugin-ini\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.";
};

@@ -144,3 +154,3 @@ readonly embeddedJsonIdentifiers: {

}];
readonly description: "Specify embedded JSON language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.";
};

@@ -164,3 +174,3 @@ readonly embeddedJsonParser: {

}];
readonly description: "Specify embedded LaTeX language identifiers. This requires \"prettier-plugin-latex\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.";
};

@@ -174,3 +184,3 @@ readonly embeddedMarkdownIdentifiers: {

}];
readonly description: "Specify embedded Markdown language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.";
};

@@ -184,3 +194,3 @@ readonly embeddedPhpIdentifiers: {

}];
readonly description: "Specify embedded PHP language identifiers. This requires \"@prettier/plugin-php\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.";
};

@@ -194,3 +204,3 @@ readonly embeddedPropertiesIdentifiers: {

}];
readonly description: "Specify embedded Java Properties language identifiers. This requires \"prettier-plugin-properties\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.";
};

@@ -204,3 +214,3 @@ readonly embeddedRubyIdentifiers: {

}];
readonly description: "Specify embedded Ruby language identifiers. This requires \"@prettier/plugin-ruby\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.";
};

@@ -224,3 +234,3 @@ readonly embeddedRubyParser: {

}];
readonly description: "Specify embedded Shell language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.";
};

@@ -234,3 +244,3 @@ readonly embeddedSqlIdentifiers: {

}];
readonly description: "Specify embedded SQL language identifiers. This requires \"prettier-plugin-sql\" or \"prettier-plugin-sql-cst\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.";
};

@@ -264,3 +274,3 @@ readonly embeddedSqlPlugin: {

}];
readonly description: "Specify embedded TOML language identifiers. This requires \"prettier-plugin-toml\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.";
};

@@ -274,3 +284,3 @@ readonly embeddedTsIdentifiers: {

}];
readonly description: "Specify embedded TS language parsers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.";
};

@@ -294,3 +304,3 @@ readonly embeddedTsParser: {

}];
readonly description: "Specify embedded XML language identifiers. This requires \"@prettier/plugin-xml\".";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.";
};

@@ -304,3 +314,3 @@ readonly __embeddedXmlFragmentRecoverIndex: {

}];
readonly description: "This option is read only and used as a workaround to support xml fragments";
readonly description: "This option is read only and is used internally as a workaround to support xml fragments";
};

@@ -314,3 +324,3 @@ readonly embeddedYamlIdentifiers: {

}];
readonly description: "Specify embedded YAML language identifiers.";
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.";
};

@@ -317,0 +327,0 @@ };

@@ -5,2 +5,3 @@ import type { TemplateLiteral } from "estree";

import type { PrettierPluginGlobalOptions } from "./options.js";
import { RemoveIndex } from "./utils.js";
declare module "estree" {

@@ -33,4 +34,4 @@ interface Comment {

identifiers: AutocompleteStringList<EmbeddedDefaultIdentifier[]>;
options: Omit<Omit<Options, keyof PrettierPluginEmbedOptions> & Omit<PrettierPluginEmbedOptions, keyof PrettierPluginGlobalOptions | ReturnType<typeof makeIdentifiersOptionName<EmbeddedLanguage>>>, "printWidth" | "endOfLine" | "useTabs" | "tabWidth" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>;
options: Omit<Omit<RemoveIndex<Options>, keyof PrettierPluginEmbedOptions> & Omit<PrettierPluginEmbedOptions, keyof PrettierPluginGlobalOptions | ReturnType<typeof makeIdentifiersOptionName<EmbeddedLanguage>>>, "printWidth" | "endOfLine" | "useTabs" | "tabWidth" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>;
}
export type EmbeddedOverrides = EmbeddedOverride[];
import type { Node } from "estree";
import { type AstPath, type Options } from "prettier";
export declare const resolveEmbeddedOverrideOptions: (embeddedOverridesString: string | undefined, identifier: string, sourceFilePath?: string) => Promise<Omit<Omit<Options, keyof import("./index.js").PrettierPluginEmbedOptions> & Omit<import("./index.js").PrettierPluginEmbedOptions, "embeddedNoopIdentifiers" | "embeddedCssIdentifiers" | "embeddedEsIdentifiers" | "embeddedGlslIdentifiers" | "embeddedGraphqlIdentifiers" | "embeddedHtmlIdentifiers" | "embeddedIniIdentifiers" | "embeddedJsonIdentifiers" | "embeddedLatexIdentifiers" | "embeddedMarkdownIdentifiers" | "embeddedPhpIdentifiers" | "embeddedPropertiesIdentifiers" | "embeddedRubyIdentifiers" | "embeddedShIdentifiers" | "embeddedSqlIdentifiers" | "embeddedTomlIdentifiers" | "embeddedTsIdentifiers" | "embeddedXmlIdentifiers" | "embeddedYamlIdentifiers" | keyof import("./options.js").PrettierPluginGlobalOptions>, "parser" | "filepath" | "endOfLine" | "embeddedLanguageFormatting" | "printWidth" | "tabWidth" | "useTabs" | `__${string}`> | undefined>;
export declare const resolveEmbeddedOverrideOptions: (embeddedOverridesString: string | undefined, identifier: string, sourceFilePath?: string) => Promise<Omit<Omit<RemoveIndex<Options>, keyof import("./index.js").PrettierPluginEmbedOptions> & Omit<import("./index.js").PrettierPluginEmbedOptions, "embeddedNoopIdentifiers" | "embeddedCssIdentifiers" | "embeddedEsIdentifiers" | "embeddedGlslIdentifiers" | "embeddedGraphqlIdentifiers" | "embeddedHtmlIdentifiers" | "embeddedIniIdentifiers" | "embeddedJsonIdentifiers" | "embeddedLatexIdentifiers" | "embeddedMarkdownIdentifiers" | "embeddedPhpIdentifiers" | "embeddedPropertiesIdentifiers" | "embeddedRubyIdentifiers" | "embeddedShIdentifiers" | "embeddedSqlIdentifiers" | "embeddedTomlIdentifiers" | "embeddedTsIdentifiers" | "embeddedXmlIdentifiers" | "embeddedYamlIdentifiers" | keyof import("./options.js").PrettierPluginGlobalOptions>, "parser" | "filepath" | "endOfLine" | "embeddedLanguageFormatting" | "printWidth" | "tabWidth" | "useTabs" | `__${string}`> | undefined>;
export declare function getIdentifierFromComment({ node, parent }: AstPath<Node>, comments: string[], options: Options): string | undefined;
export declare function getIdentifierFromTag({ node, parent }: AstPath<Node>, tags: string[], options: Options): string | undefined;
export type RemoveIndex<T> = {
[K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K];
};

@@ -5,3 +5,3 @@ {

"private": false,
"version": "0.4.5",
"version": "0.4.6",
"type": "module",

@@ -26,3 +26,3 @@ "files": [

"url": "https://github.com/Sec-ant/prettier-plugin-embed/issues",
"email": "zzwu@zju.edu.cn"
"email": "zezhengwu@proton.me"
},

@@ -72,7 +72,7 @@ "keywords": [

"@types/estree": "^1.0.5",
"@types/node": "^20.11.0",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@vitest/coverage-istanbul": "^1.2.0",
"@vitest/ui": "^1.2.0",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@vitest/coverage-istanbul": "^1.2.1",
"@vitest/ui": "^1.2.1",
"@xml-tools/parser": "^1.0.11",

@@ -84,3 +84,3 @@ "chevrotain": "7.1.1",

"npm-check-updates": "^16.14.12",
"prettier": "^3.2.1",
"prettier": "^3.2.4",
"prettier-plugin-glsl": "^0.1.3",

@@ -99,3 +99,3 @@ "prettier-plugin-ini": "^1.1.0",

"vite": "^5.0.11",
"vitest": "^1.2.0"
"vitest": "^1.2.1"
},

@@ -102,0 +102,0 @@ "dependencies": {

@@ -7,5 +7,5 @@ <div align="center">

[![npm version](https://badgen.net/npm/v/prettier-plugin-embed?cache=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![npm downloads](https://badgen.net/npm/dm/prettier-plugin-embed?cache=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![npm license](https://badgen.net/npm/license/prettier-plugin-embed?cache=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest)
[![npm version](https://img.shields.io/npm/v/prettier-plugin-embed?cacheSeconds=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![npm downloads](https://img.shields.io/npm/dm/prettier-plugin-embed?cacheSeconds=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![npm license](https://img.shields.io/npm/l/prettier-plugin-embed?cacheSeconds=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest)
[![github last commit](https://badgen.net/github/last-commit/Sec-ant/prettier-plugin-embed?cache=300)](https://github.com/Sec-ant/prettier-plugin-embed) [![bundlephobia minzipped](https://badgen.net/bundlephobia/minzip/prettier-plugin-embed?cache=300)](https://bundlephobia.com/package/prettier-plugin-embed@latest) [![](https://data.jsdelivr.com/v1/package/npm/prettier-plugin-embed/badge?style=rounded)](https://www.jsdelivr.com/package/npm/prettier-plugin-embed)
[![github last commit](https://img.shields.io/github/last-commit/Sec-ant/prettier-plugin-embed?cacheSeconds=300)](https://github.com/Sec-ant/prettier-plugin-embed) [![bundlephobia minzipped](https://img.shields.io/bundlephobia/minzip/prettier-plugin-embed?cacheSeconds=300)](https://bundlephobia.com/package/prettier-plugin-embed@latest) [![](https://img.shields.io/jsdelivr/npm/hm/prettier-plugin-embed?cacheSeconds=300&color=ff5627)](https://www.jsdelivr.com/package/npm/prettier-plugin-embed)

@@ -99,15 +99,38 @@ A Configurable [Prettier](https://prettier.io/) [Plugin](https://prettier.io/docs/en/plugins.html) to Format [Embedded Languages](https://prettier.io/docs/en/options.html#embedded-language-formatting) in `js`/`ts` Files.

Therefore, to enable formatting for a specific embedded language, the corresponding Prettier plugin for that language must also be loaded. For example, if you wish to format embedded XML code, you will need to load both this plugin and [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml). To find out which other plugins are required when using this plugin, please refer to the [Language-Specific Options](#language-specific-options) section below.
Therefore, to enable formatting for a specific embedded language, the corresponding Prettier plugin for that language must also be loaded. For example, if you wish to format embedded XML language, you will need to load both this plugin and [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml). To find out which other plugins are required when using this plugin, please refer to the [Language-Specific Options](#language-specific-options) section below.
Embedded languages to be formatted are required to be enclosed in the template literals, and are identified by the preceding [tags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) `` identifier`...` `` or [block comments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#block_comments) `` /* identifier */ `...` ``. This plugin comes pre-configured with a built-in set of identifiers for identifying various embedded languages. For instance, using identifiers like `xml` or `svg` will trigger automatic formatting for the embedded XML code. You can specify an alternative list of identifiers using the `embeddedXmlIdentifiers` option. The naming convention for these options follows the pattern of `embedded<Language>Identifiers` for other languages as well. Further details on these options and how to configure them are also available in the [Language-Specific Options](#language-specific-options) section.
Embedded languages to be formatted are required to be enclosed in the template literals, and are identified by the preceding [tags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) `` identifier`...` `` or [block comments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#block_comments) `` /* identifier */ `...` ``. This plugin comes pre-configured with a built-in set of identifiers for identifying various embedded languages. For instance, using identifiers like `xml` or `svg` will trigger automatic formatting for the embedded XML language. You can specify an alternative list of identifiers using the `embeddedXmlIdentifiers` option. The naming convention for these options follows the pattern of `embedded<Language>Identifiers` for other languages as well. Further details on these options and how to configure them are also available in the [Language-Specific Options](#language-specific-options) section.
To exclude certain identifiers from being identified, including the default ones supported by the [`embedded-language-formatting`](https://prettier.io/docs/en/options.html#embedded-language-formatting) option, add them to the list of the `embeddedNoopIdentifiers` option. Any matching identifiers listed in this option will take precedence over other `embedded<Language>Identifiers` options, effectively disabling their formatting.
**Important: Until this notice is removed, always specify identifiers explicitly and do not rely on the built-in defaults, as they may be subject to change.**
> [!IMPORTANT]
>
> Until this notice is removed, always specify identifiers explicitly and do not rely on the built-in defaults, as they may be subject to change.
### Language-Specific Options
<details>
Supported embedded languages are:
- [CSS](#css)
- [ES (ECMAScript/JavaScript)](#es-ecmascriptjavascript)
- [GLSL](#glsl)
- [GraphQL](#graphql)
- [HTML](#html)
- [INI](#ini)
- [JSON](#json)
- [LaTeX](#latex)
- [Markdown](#markdown)
- [PHP](#php)
- [Properties](#properties)
- [Ruby](#ruby)
- [Sh (Shell)](#sh-shell)
- [SQL](#sql)
- [TOML](#TOML)
- [TS (TypeScript)](#ts-typescript)
- [XML](#xml)
- [YAML](#yaml)
<details open>
<summary>
Click Here
Click Here to Toggle
</summary>

@@ -117,161 +140,180 @@

| Option | Default | Description |
| :-----------------------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedNoopIdentifiers` | `[]` | Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and from being formatted |
| Option | Type | Default | Description |
| :-----------------------: | :--------: | :------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedNoopIdentifiers` | `string[]` | [`[]`](./src/embedded/noop/options.ts) | Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted. |
This doesn't require other plugins and can override the native embedded language formatting. It serves as a way to turn off embedded language formatting for specific language identifiers.
This option doesn't require other plugins and can override the native embedded language formatting. It serves as a way to turn off embedded language formatting for specific language identifiers.
#### CSS
| Option | Default | Description |
| :----------------------: | :--------------------------------------: | ------------------------------------------------------------------------------------------------- |
| `embeddedCssIdentifiers` | [`[...]`](./src/embedded/css/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as CSS code |
| Option | Type | Default | Description |
| :----------------------: | :--------: | :----------------------------------------: | --------------------------------------------------------------------------------------------------------------- |
| `embeddedCssIdentifiers` | `string[]` | [`["css"]`](./src/embedded/css/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language. |
Formatting embedded CSS code doesn't require other plugins and uses the parsers and printers provided by Prettier natively. This can override the native embedded language formatting for CSS code.
Formatting embedded CSS language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
#### ES
This can override the native formatting bahavior for embedded CSS language. If you want to keep the native behavior, set `embeddedCssIdentifiers` to `[]` or other identifiers.
| Option | Default | Description |
| :---------------------: | :---------------------------------------: | --------------------------------------------------------------------------------------------------------------------- |
| `embeddedEsIdentifiers` | [`[...]`](./src/embedded/es/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as ECMAScript (JavaScript) code |
| `embeddedEsParser` | [`"babel"`](./src/embedded/es/options.ts) | The parser used to parse the ECMASCript (JavaScript) code |
#### ES (ECMAScript/JavaScript)
Formatting embedded ECMAScript code doesn't require other plugins and uses the parsers and printers provided by Prettier natively. This can override the native embedded language formatting for ECMAScript code.
| Option | Type | Default | Description |
| :---------------------: | :-----------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedEsIdentifiers` | `string[]` | [`["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"]`](./src/embedded/es/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language. |
| `embeddedEsParser` | [`"babel" \| "babel-flow" \| "acorn" \| "espree" \| "flow" \| "meriyah"`](./src/embedded/es/options.ts) | [`"babel"`](./src/embedded/es/options.ts) | The parser used to parse the embedded ECMASCript/JavaScript language. |
Formatting embedded ECMAScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
#### GLSL
| Option | Default | Description |
| :-----------------------: | :---------------------------------------: | -------------------------------------------------------------------------------------------------- |
| `embeddedGlslIdentifiers` | [`[...]`](./src/embedded/glsl/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as GLSL code |
| Option | Type | Default | Description |
| :-----------------------: | :--------: | :----------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `embeddedGlslIdentifiers` | `string[]` | [`["glsl", "shader"]`](./src/embedded/glsl/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin. |
Formatting embedded GLSL code requires [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl) to be loaded as well.
Formatting embedded GLSL language requires the [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl) plugin to be loaded as well.
#### GraphQL
| Option | Default | Description |
| :--------------------------: | :------------------------------------------: | ----------------------------------------------------------------------------------------------------- |
| `embeddedGraphqlIdentifiers` | [`[...]`](./src/embedded/graphql/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as GraphQL code |
| Option | Type | Default | Description |
| :--------------------------: | :--------: | :-------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------- |
| `embeddedGraphqlIdentifiers` | `string[]` | [`["graphql", "gql"]`](./src/embedded/graphql/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language. |
Formatting embedded GraphQL code doesn't require other plugins and uses the parsers and printers provided by Prettier natively. This can override the native embedded language formatting for GraphQL code. If you want to keep the native behavior, set `embeddedGraphqlIdentifiers` to `[]` or other identifiers.
Formatting embedded GraphQL language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
This can override the native formatting behavior for embedded GraphQL language. If you want to keep the native behavior, set `embeddedGraphqlIdentifiers` to `[]` or other identifiers.
#### HTML
| Option | Default | Description |
| :-----------------------: | :---------------------------------------: | -------------------------------------------------------------------------------------------------- |
| `embeddedHtmlIdentifiers` | [`[...]`](./src/embedded/html/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as HTML code |
| Option | Type | Default | Description |
| :-----------------------: | :-----------------------------------------------------------------------: | :---------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------- |
| `embeddedHtmlIdentifiers` | `string[]` | [`["html", "xhtml"]`](./src/embedded/html/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language. |
| `embeddedHtmlParser` | [`"html" \| "vue" \| "angular" \| "lwc"`](./src/embedded/html/options.ts) | [`"html"`](./src/embedded/html/options.ts) | The parser used to parse the embedded HTML language. |
Formatting embedded HTML code doesn't require other plugins and uses the parsers and printers provided by Prettier natively. This can override the native embedded language formatting for HTML code.
Formatting embedded HTML language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
This can override the native formatting behavior for embedded HTML language. If you want to keep the native behavior, set `embeddedHtmlIdentifiers` to `[]` or other identifiers.
If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
#### INI
| Option | Default | Description |
| :----------------------: | :--------------------------------------: | ------------------------------------------------------------------------------------------------- |
| `embeddedIniIdentifiers` | [`[...]`](./src/embedded/ini/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as INI code |
| Option | Type | Default | Description |
| :----------------------: | :--------: | :------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedIniIdentifiers` | `string[]` | [`["ini", "cfg", "pro"]`](./src/embedded/ini/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin. |
Formatting embedded INI code requires [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini) to be loaded as well. And [options](https://github.com/kddnewton/prettier-plugin-ini#configuration) supported by `prettier-plugin-ini` can therefore be used to further control the formatting behavior.
Formatting embedded INI language requires the [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini) plugin to be loaded as well. And [options](https://github.com/kddnewton/prettier-plugin-ini#configuration) supported by `prettier-plugin-ini` can therefore be used to further control the formatting behavior.
#### JSON
| Option | Default | Description |
| :-----------------------: | :----------------------------------------: | -------------------------------------------------------------------------------------------------- |
| `embeddedJsonIdentifiers` | [`[...]`](./src/embedded/json/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as JSON code |
| `embeddedJsonParser` | [`"json"`](./src/embedded/json/options.ts) | The parser used to parse the JSON code |
| Option | Type | Default | Description |
| :-----------------------: | :----------------------------------------------------------------------------------: | :---------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------- |
| `embeddedJsonIdentifiers` | `string[]` | [`["json", "jsonl"]`](./src/embedded/json/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language. |
| `embeddedJsonParser` | [`"json" \| "json5" \| "jsonc" \| "json-stringify"`](./src/embedded/json/options.ts) | [`"json"`](./src/embedded/json/options.ts) | The parser used to parse the embedded JSON language. |
Formatting embedded JSON code doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
Formatting embedded JSON language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
#### LaTeX
| Option | Default | Description |
| :------------------------: | :----------------------------------------: | --------------------------------------------------------------------------------------------------- |
| `embeddedLatexIdentifiers` | [`[...]`](./src/embedded/latex/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as LaTeX code |
| Option | Type | Default | Description |
| :------------------------: | :--------: | :---------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedLatexIdentifiers` | `string[]` | [`["latex", "tex", "aux", "cls", "bbl", "bib", "toc", "sty"]`](./src/embedded/latex/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin. |
Formatting embedded LaTeX code requires [`prettier-plugin-latex`](https://github.com/siefkenj/prettier-plugin-latex) to be loaded as well.
Formatting embedded LaTeX language requires the [`prettier-plugin-latex`](https://github.com/siefkenj/prettier-plugin-latex) plugin to be loaded as well.
#### Markdown
| Option | Default | Description |
| :---------------------------: | :-------------------------------------------: | ------------------------------------------------------------------------------------------------------ |
| `embeddedMarkdownIdentifiers` | [`[...]`](./src/embedded/markdown/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as Markdown code |
| Option | Type | Default | Description |
| :---------------------------: | :--------: | :--------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------- |
| `embeddedMarkdownIdentifiers` | `string[]` | [`["md", "markdown"]`](./src/embedded/markdown/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language. |
Formatting embedded Markdown code doesn't require other plugins and uses the parsers and printers provided by Prettier natively. This can override the native embedded language formatting for Markdown code.
Formatting embedded Markdown language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
This can override the native formatting for embedded Markdown language. If you want to keep the native behavior, set `embeddedMarkdownIdentifiers` to `[]` or other identifiers.
#### PHP
| Option | Default | Description |
| :----------------------: | :--------------------------------------: | ------------------------------------------------------------------------------------------------- |
| `embeddedPhpIdentifiers` | [`[...]`](./src/embedded/php/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as PHP code |
| Option | Type | Default | Description |
| :----------------------: | :--------: | :------------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedPhpIdentifiers` | `string[]` | [`["php", "php5"]`](./src/embedded/php/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin. |
Formatting embedded PHP code requires [`@prettier/plugin-php`](https://github.com/prettier/plugin-php) to be loaded as well. And [options](https://github.com/prettier/plugin-php#configuration) supported by `@prettier/plugin-php` can therefore be used to further control the formatting behavior.
Formatting embedded PHP language requires the [`@prettier/plugin-php`](https://github.com/prettier/plugin-php) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-php#configuration) supported by `@prettier/plugin-php` can therefore be used to further control the formatting behavior.
#### Properties
| Option | Default | Description |
| :-----------------------------: | :---------------------------------------------: | ------------------------------------------------------------------------------------------------------------- |
| `embeddedPropertiesIdentifiers` | [`[...]`](./src/embedded/properties/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as Java Properties code |
| Option | Type | Default | Description |
| :-----------------------------: | :--------: | :------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `embeddedPropertiesIdentifiers` | `string[]` | [`["properties"]`](./src/embedded/properties/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin. |
Formatting embedded Java Properties code requires [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) to be loaded as well. And [options](https://github.com/eemeli/prettier-plugin-properties#configuration) supported by `prettier-plugin-properties` can therefore be used to further control the formatting behavior.
Formatting embedded Properties language requires the [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) plugin to be loaded as well. And [options](https://github.com/eemeli/prettier-plugin-properties#configuration) supported by `prettier-plugin-properties` can therefore be used to further control the formatting behavior.
#### Ruby
| Option | Default | Description |
| :-----------------------: | :-------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedRubyIdentifiers` | [`[...]`](./src/embedded/ruby/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as Ruby code |
| `embeddedRubyParser` | [`undefined`](./src/embedded/ruby/options.ts) | The parser used to parse the Ruby code. Available choices are `"ruby"`, `"rbs"` and `"haml"`. It will auto detect the parser if this is undefined. |
| Option | Type | Default | Description |
| :-----------------------: | :-----------------------------------------------------------: | :------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedRubyIdentifiers` | `string[]` | [`["ruby"]`](./src/embedded/ruby/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin. |
| `embeddedRubyParser` | [`"ruby" \| "rbs" \| "haml"`](./src/embedded/ruby/options.ts) | [`"ruby"`](./src/embedded/ruby/options.ts) | The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin. |
Formatting embedded Ruby code requires [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-ruby` can therefore be used to further control the formatting behavior.
Formatting embedded Ruby language requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-ruby` can therefore be used to further control the formatting behavior.
#### Shell
If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
| Option | Default | Description |
| :---------------------: | :-------------------------------------: | --------------------------------------------------------------------------------------------------- |
| `embeddedShIdentifiers` | [`[...]`](./src/embedded/sh/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as Shell code |
#### Sh (Shell)
Formatting embedded Shell code requires [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options) supported by `prettier-plugin-sh` can therefore be used to further control the formatting behavior.
| Option | Type | Default | Description |
| :---------------------: | :--------: | :--------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedShIdentifiers` | `string[]` | [`["sh"]`](./src/embedded/sh/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin. |
Note that `prettier-plugin-sh` supports different variants of shell syntaxes and they are specified by the [`variant` option](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options). To map a subset of identifiers to another dialect, please use [`embeddedOverrides`](#embeddedoverrides).
Formatting embedded Shell language requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options) supported by `prettier-plugin-sh` can therefore be used to further control the formatting behavior.
Note that `prettier-plugin-sh` supports different variants of shell syntaxes and they are specified by the [`variant` option](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options). If you want to specify different variants for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
#### SQL
| Option | Default | Description |
| :----------------------: | :------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedSqlIdentifiers` | [`[...]`](./src/embedded/sql/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as SQL code |
| `embeddedSqlPlugin` | [`"prettier-plugin-sql"`](./src/embedded/sql/options.ts) | The plugin used to format the SQL code. Available options are `"prettier-plugin-sql"` and `"prettier-plugin-sql-cst"`. |
| `embeddedSqlParser` | [`"sqlite"`](./src/embedded/sql/options.ts) | The parser used to parse the SQL code. Available options are `"sqlite"` and `"bigquery"`. This option is only for `prettier-plugin-sql-cst` |
| Option | Type | Default | Description |
| :----------------------: | :------------------------------------------------------------------------------------------------: | :------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedSqlIdentifiers` | `string[]` | [`["sql"]`](./src/embedded/sql/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin. |
| `embeddedSqlPlugin` | [`"prettier-plugin-sql" \| "prettier-plugin-sql-cst"`](./src/embedded/sql/options.ts) | [`"prettier-plugin-sql"`](./src/embedded/sql/options.ts) | The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin. |
| `embeddedSqlParser` | [`"sqlite" \| "bigquery" \| "mysql" \| "mariadb" \| "postgresql"` ](./src/embedded/sql/options.ts) | [`"sqlite"`](./src/embedded/sql/options.ts) | Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin. |
Formatting embedded SQL code requires [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) or [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst) to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options) supported by `prettier-plugin-sql`, or [options](https://github.com/nene/prettier-plugin-sql-cst?tab=readme-ov-file#configuration) supported by `prettier-plugin-sql-cst` can therefore be used to further control the formatting behavior.
Formatting embedded SQL language requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options) supported by `prettier-plugin-sql`, or [options](https://github.com/nene/prettier-plugin-sql-cst?tab=readme-ov-file#configuration) supported by `prettier-plugin-sql-cst` can therefore be used to further control the formatting behavior.
Note that `prettier-plugin-sql` supports many different SQL dialects and they are specified by the [`language` or `database` option](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options). And `prettier-plugin-sql-cst` also supports other parsers. To map a subset of identifiers to another dialect or parser, please use [`embeddedOverrides`](#embeddedoverrides).
Note that `prettier-plugin-sql` supports many different SQL dialects which are specified by the [`language`, `database` or `dialect` option](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options). And `prettier-plugin-sql-cst` also supports various parsers as shown above. If you want to specify different dialects or parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
#### TOML
| Option | Default | Description |
| :-----------------------: | :---------------------------------------: | -------------------------------------------------------------------------------------------------- |
| `embeddedTomlIdentifiers` | [`[...]`](./src/embedded/toml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as TOML code |
| Option | Type | Default | Description |
| :-----------------------: | :--------: | :------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `embeddedTomlIdentifiers` | `string[]` | [`["toml"]`](./src/embedded/toml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin. |
Formatting embedded TOML code requires [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) to be loaded as well. And options supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior.
Formatting embedded TOML language requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin to be loaded as well. And options supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior.
#### TS
#### TS (TypeScript)
| Option | Default | Description |
| :---------------------: | :--------------------------------------------: | -------------------------------------------------------------------------------------------------------- |
| `embeddedTsIdentifiers` | [`[...]`](./src/embedded/ts/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as TypeScript code |
| `embeddedTsParser` | [`"typescript"`](./src/embedded/ts/options.ts) | The parser used to parse the TypeScript code |
| Option | Type | Default | Description |
| :---------------------: | :----------------------------------------------------------: | :-------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------- |
| `embeddedTsIdentifiers` | `string[]` | [`["ts", "tsx", "cts", "mts", "typescript"]`](./src/embedded/ts/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language. |
| `embeddedTsParser` | [`"typescript" \| "babel-ts"`](./src/embedded/ts/options.ts) | [`"typescript"`](./src/embedded/ts/options.ts) | The parser used to parse the embedded TypeScript language. |
Formatting embedded TypeScript code doesn't require other plugins and uses the parsers and printers provided by Prettier natively. This can override the native embedded language formatting for TypeScript code.
Formatting embedded TypeScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
#### XML
| Option | Default | Description |
| :----------------------: | :--------------------------------------: | ------------------------------------------------------------------------------------------------- |
| `embeddedXmlIdentifiers` | [`[...]`](./src/embedded/xml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as XML code |
| Option | Type | Default | Description |
| :----------------------: | :--------: | :--------------------------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `embeddedXmlIdentifiers` | `string[]` | [`["xml", "opml", "rss", "svg"]`](./src/embedded/xml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin. |
Formatting embedded XML code requires [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml) to be loaded as well. And [options](https://github.com/prettier/plugin-xml#configuration) supported by `@prettier/plugin-xml` can therefore be used to further control the formatting behavior.
Formatting embedded XML language requires the [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-xml#configuration) supported by `@prettier/plugin-xml` can therefore be used to further control the formatting behavior.
#### YAML
| Option | Default | Description |
| :-----------------------: | :---------------------------------------: | -------------------------------------------------------------------------------------------------- |
| `embeddedYamlIdentifiers` | [`[...]`](./src/embedded/yaml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as YAML code |
| Option | Type | Default | Description |
| :-----------------------: | :--------: | :-------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------- |
| `embeddedYamlIdentifiers` | `string[]` | [`["yaml", "yml"]`](./src/embedded/yaml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language. |
Formatting embedded YAML code doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
Formatting embedded YAML language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.

@@ -282,9 +324,9 @@ </details>

| Option | Default | Description |
| :-----------------------------------: | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `noEmbeddedIdentificationByComment` | `[]` | Turns off `` /* identifier */ `...` `` comment-based language identification for the specified identifiers |
| `noEmbeddedIdentificationByTag` | `[]` | Turns off `` identifier`...` `` tag-based language identification for the specified identifiers |
| `preserveEmbeddedExteriorWhitespaces` | `[]` | Preserves leading and trailing whitespaces in the formatting results for the specified identifiers |
| `noEmbeddedMultiLineIndentation` | `[]` | Turns off auto indentation in the formatting results when they are formatted to span multi lines for the specified identifiers |
| `embeddedOverrides` | `undefined` | Option overrides for the specified identifiers. This option accepts a string if not undefined. See [below](#embeddedoverrides) for a detailed explanation |
| Option | Type | Default | Description |
| :-----------------------------------: | :--------: | :---------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `noEmbeddedIdentificationByComment` | `string[]` | `[]` | Turns off `` /* identifier */ `...` `` comment-based embedded language identification for the specified identifiers. |
| `noEmbeddedIdentificationByTag` | `string[]` | `[]` | Turns off `` identifier`...` `` tag-based embedded language identification for the specified identifiers. |
| `preserveEmbeddedExteriorWhitespaces` | `string[]` | `[]` | Preserves leading and trailing whitespaces in the formatting results for the specified identifiers. |
| `noEmbeddedMultiLineIndentation` | `string[]` | `[]` | Turns off auto indentation in the formatting results when they are formatted to span multi lines for the specified identifiers. |
| `embeddedOverrides` | `string` | `undefined` | Option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file. See [below](#embeddedoverrides) for a detailed explanation. |

@@ -297,3 +339,3 @@ #### `embeddedOverrides`

In a json file, the root is the array of objects. In a javascript file, the array of objects should be a default export, or a named export with the name `embeddedOverrides`.
In a json file, the root is the array of objects. In a JavaScript file, the array of objects should be a default export, or a named export with the name `embeddedOverrides`.

@@ -319,3 +361,5 @@ An example `.json` file is:

Please note that not every option is supported to override. That largely depends on at which phase those options will kick in and take effect. For example, you can't override `tabWidth` in `embeddedOverrides` because this option is used in the [`printDocToString`](https://github.com/prettier/prettier/blob/7aecca5d6473d73f562ca3af874831315f8f2581/src/document/printer.js#L302) phase, where `prettier-plugin-embed` cannot override this option for only a set of specified identifiers. To find the list of unsupported options, please check the interface definition of `EmbeddedOverride` in the [source code](https://github.com/Sec-ant/prettier-plugin-embed/blob/main/src/types.ts).
> [!CAUTION]
>
> Please note that not every option is supported to override. That largely depends on at which phase those options will kick in and take effect. For example, you can't override `tabWidth` in `embeddedOverrides` because this option is used in the [`printDocToString`](https://github.com/prettier/prettier/blob/7aecca5d6473d73f562ca3af874831315f8f2581/src/document/printer.js#L302) phase, where `prettier-plugin-embed` cannot override this option for only a set of specified identifiers. To find the list of unsupported options, please check the interface definition of `EmbeddedOverride` in the [source code](https://github.com/Sec-ant/prettier-plugin-embed/blob/main/src/types.ts).

@@ -322,0 +366,0 @@ ## Contributing

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc