vitepress-openapi 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{OAJSONEditor-BPdzinnW.js → OAJSONEditor-BfaXXObm.js} +2 -2
- package/dist/{OAJSONEditor-cdYfH8pW.cjs → OAJSONEditor-fTqoBDiY.cjs} +1 -1
- package/dist/{angular-html-BoKsRe8T.cjs → angular-html-Dk2XGZ_t.cjs} +1 -1
- package/dist/{angular-html-D5QwJSjx.js → angular-html-Dl5L_ndT.js} +2 -2
- package/dist/{angular-ts-CXuTnAMH.cjs → angular-ts-ByuE09su.cjs} +1 -1
- package/dist/{angular-ts-B0kZpGGd.js → angular-ts-DATG01QH.js} +2 -2
- package/dist/{apl-CO2hi6pu.js → apl-B903Y1iI.js} +5 -5
- package/dist/{apl-CjAWNKej.cjs → apl-REpE4EOr.cjs} +1 -1
- package/dist/{astro-C8AbPvmY.js → astro-B6XJ1XzP.js} +5 -5
- package/dist/{astro-C6WzLepe.cjs → astro-wd_9JORh.cjs} +1 -1
- package/dist/{blade-bJOeoSe0.cjs → blade-CJNVUHnO.cjs} +1 -1
- package/dist/{blade-B3TXqIqP.js → blade-DU7K6RH3.js} +7 -7
- package/dist/{c-BTzN4Ylc.js → c-BFcbaMUO.js} +1 -1
- package/dist/{c-BCyoZ90X.cjs → c-DkEd8-YD.cjs} +1 -1
- package/dist/{chapel-D3SOeXgF.cjs → chapel-BDpe9hj3.cjs} +1 -1
- package/dist/{chapel-DqUUkRYq.js → chapel-CyR2VtwX.js} +1 -1
- package/dist/{cobol-dlQjEakv.cjs → cobol-CDgLba1H.cjs} +1 -1
- package/dist/{cobol-DFLW8ca0.js → cobol-ZUVB5fnm.js} +2 -2
- package/dist/{coffee-TUzF5uor.cjs → coffee-BxVt1U7S.cjs} +1 -1
- package/dist/{coffee-1KoIHtzW.js → coffee-D9j_lkLc.js} +1 -1
- package/dist/{core-x4pNOQS7.cjs → core-DCROFLpl.cjs} +1 -1
- package/dist/{core-CSILRXKH.js → core-ZiHa6_mm.js} +1 -1
- package/dist/{cpp-tnOfy09q.cjs → cpp-BPWm4FiD.cjs} +1 -1
- package/dist/{cpp-yEMsPd-1.js → cpp-NN3vBjLe.js} +3 -3
- package/dist/{crystal-CENIitzj.js → crystal-BCSv9BMD.js} +6 -6
- package/dist/{crystal-D_nHX3jS.cjs → crystal-Cg-JMHNA.cjs} +1 -1
- package/dist/{css-B-WLUKlS.js → css-BDew7Z2b.js} +1 -1
- package/dist/{css-02TmpFbt.cjs → css-Cca861pZ.cjs} +1 -1
- package/dist/{dist-C1v4Xm4x.js → dist-CN9hkg4t.js} +1 -1
- package/dist/{dist-BxzxjMCz.cjs → dist-Dsa_0AoM.cjs} +1 -1
- package/dist/{edge-f2PDRzgK.cjs → edge-CMIfIdja.cjs} +1 -1
- package/dist/{edge-BEj_2N8x.js → edge-DXKIJOV7.js} +3 -3
- package/dist/{elixir-CQkxmVTM.js → elixir-BjNct3TS.js} +1 -1
- package/dist/{elixir-CIcaqRsY.cjs → elixir-BmJsBojU.cjs} +1 -1
- package/dist/{elm-DzGi_nR3.js → elm-CPQSACRc.js} +1 -1
- package/dist/{elm-7G0I-hE6.cjs → elm-rLsOgMwT.cjs} +1 -1
- package/dist/{engine-javascript-DsJlQOsE.cjs → engine-javascript-B9hqc1Sn.cjs} +1 -1
- package/dist/{engine-javascript-DSMQf2z2.js → engine-javascript-CtAw-nzg.js} +2 -2
- package/dist/{erb-COP2UPZ7.js → erb-CQUldNHj.js} +2 -2
- package/dist/{erb-B9-cGaTm.cjs → erb-CiTsuMX9.cjs} +1 -1
- package/dist/{git-rebase-DTYLKCWV.js → git-rebase-5OapP1hA.js} +1 -1
- package/dist/{git-rebase-Ku61ihN2.cjs → git-rebase-CjFDc1kk.cjs} +1 -1
- package/dist/{glimmer-js-izmglT1O.cjs → glimmer-js-CPs3ZMWA.cjs} +1 -1
- package/dist/{glimmer-js-D29AEl8t.js → glimmer-js-DJj4duzR.js} +4 -4
- package/dist/{glimmer-ts-DJ1fakxz.cjs → glimmer-ts-CuERAYsk.cjs} +1 -1
- package/dist/{glimmer-ts-DYj3qCHB.js → glimmer-ts-drtM04VL.js} +4 -4
- package/dist/{glsl-Bc6nFncG.js → glsl-DPV3oxNS.js} +2 -2
- package/dist/{glsl-BGTPqLyQ.cjs → glsl-vKFvWHtP.cjs} +1 -1
- package/dist/{graphql-DdYH_Rp2.cjs → graphql-DG0SCdKc.cjs} +1 -1
- package/dist/{graphql-Ds5Ubte9.js → graphql-b3MqwVzn.js} +5 -5
- package/dist/{hack-B6E-ISVN.js → hack-BV8Fk8S0.js} +2 -2
- package/dist/{hack-DlUSG6ek.cjs → hack-Dnr29SMc.cjs} +1 -1
- package/dist/{haml-DSK5muqV.js → haml-DYADyojV.js} +3 -3
- package/dist/{haml-D-xAsnlc.cjs → haml-cdCU_QQV.cjs} +1 -1
- package/dist/{handlebars-CGjGomme.js → handlebars-D7Wg8zxD.js} +4 -4
- package/dist/{handlebars-BxmkFTU3.cjs → handlebars-XYDCrTNM.cjs} +1 -1
- package/dist/{html-BYiFDapk.cjs → html-DOohh95v.cjs} +1 -1
- package/dist/{html-derivative--Yb6fTDM.js → html-derivative-7yg_dBt4.js} +1 -1
- package/dist/{html-derivative-Due6nHaa.cjs → html-derivative-B_93GY2L.cjs} +1 -1
- package/dist/{html-DvKVaMAh.js → html-oFWSlHLM.js} +3 -3
- package/dist/{http-BDb2okFn.cjs → http-BpWcfGzO.cjs} +1 -1
- package/dist/{http-Wf5dll9t.js → http-C-Hd6Lz4.js} +4 -4
- package/dist/{hurl-Ds566NU_.cjs → hurl-D53hSFo7.cjs} +1 -1
- package/dist/{hurl-1Afa28rK.js → hurl-DjXOdham.js} +2 -2
- package/dist/{java-DMU2lkyP.js → java-CcAzK28d.js} +1 -1
- package/dist/{java-DwnayQnb.cjs → java-YSQdp8jH.cjs} +1 -1
- package/dist/{javascript-CkOfli2O.js → javascript-CFpHKvG0.js} +1 -1
- package/dist/{javascript-CSKossUl.cjs → javascript-CcZ4Z9Pe.cjs} +1 -1
- package/dist/{jinja-C_EeM5kX.js → jinja-BzmRQBYE.js} +1 -1
- package/dist/{jinja-D65--viX.cjs → jinja-DhuEKxK7.cjs} +1 -1
- package/dist/{jison-D5yGxh57.js → jison-CfNmROg3.js} +1 -1
- package/dist/{jison-CgJDwgW4.cjs → jison-DkP6w3Kb.cjs} +1 -1
- package/dist/{js-yaml-uHYMr7LM.cjs → js-yaml-D7HstSVO.cjs} +1 -1
- package/dist/{js-yaml-CA-Iojzo.js → js-yaml-xxJ42vHJ.js} +1 -1
- package/dist/{json-DnSlp2pP.js → json-BUhydBtV.js} +1 -1
- package/dist/{json-DMvxal4O.cjs → json-BuUbxxHW.cjs} +1 -1
- package/dist/{jsx-DIHyTcyM.js → jsx-BgXsA-DL.js} +1 -1
- package/dist/{jsx-CJAVXoYP.cjs → jsx-LBqujUwg.cjs} +1 -1
- package/dist/{julia-Upv7yuF3.cjs → julia-CFY_QNYf.cjs} +1 -1
- package/dist/{julia-pnYWyN4H.js → julia-QFUzXXyx.js} +4 -4
- package/dist/{just-Rux3ihaI.js → just-BQQqo7uc.js} +5 -5
- package/dist/{just-kcvRoQaC.cjs → just-unRxJYdl.cjs} +1 -1
- package/dist/{latex-BNmmGRr9.js → latex-61rhD9l1.js} +1 -1
- package/dist/{latex-ssVj4acX.cjs → latex-CMXzYJ7A.cjs} +1 -1
- package/dist/{liquid-CkFTSuz5.js → liquid-DJCM2ZDj.js} +4 -4
- package/dist/{liquid-D9-xfAH9.cjs → liquid-Dlc1A5fD.cjs} +1 -1
- package/dist/{lua-BPZzb4jg.js → lua-CQxTc8eB.js} +2 -2
- package/dist/{lua-CbILlNRp.cjs → lua-De5jN6Ym.cjs} +1 -1
- package/dist/{marko-U5lgzX4W.js → marko-Dd0qsahM.js} +3 -3
- package/dist/{marko-CckGih8c.cjs → marko-lDIEsg9U.cjs} +1 -1
- package/dist/{mdc-CIgbmpvb.cjs → mdc-CyWtd_UH.cjs} +1 -1
- package/dist/{mdc-ftW0jKss.js → mdc-_80um6kj.js} +2 -2
- package/dist/{nginx-pp3BriFA.cjs → nginx-Bys-Mt_F.cjs} +1 -1
- package/dist/{nginx-CO6FbhYm.js → nginx-DDrDrYzT.js} +1 -1
- package/dist/{nim-xNROytAe.cjs → nim-B-WnW_TA.cjs} +1 -1
- package/dist/{nim-CJpN9IuJ.js → nim-BKM9BEwv.js} +6 -6
- package/dist/{org-BfvkBzjQ.cjs → org-BQi9zqMo.cjs} +1 -1
- package/dist/{org-BLgfq4oa.js → org-DFPWKQMZ.js} +26 -26
- package/dist/{perl-4iy1AzjP.js → perl-BIiCtWTQ.js} +5 -5
- package/dist/{perl-gYxlBF7Z.cjs → perl-CkLK5ExR.cjs} +1 -1
- package/dist/{php-D7tWq26a.cjs → php-CgjckyHQ.cjs} +1 -1
- package/dist/{php-DBpFECnW.js → php-DOw5HPZo.js} +6 -6
- package/dist/{pug-B3SC-VJn.js → pug-BGkLdaFt.js} +3 -3
- package/dist/{pug-CYLX2lIo.cjs → pug-ZRJG_B3i.cjs} +1 -1
- package/dist/{qml-CjtYDlYC.cjs → qml-BHFWpY8E.cjs} +1 -1
- package/dist/{qml-BJryVNLB.js → qml-Bpj0emxI.js} +1 -1
- package/dist/{r-DKRgTYMs.cjs → r-CP5u50Ge.cjs} +1 -1
- package/dist/{r-CO3AGhxE.js → r-beK_-64Q.js} +1 -1
- package/dist/{razor-Cjwm6SbM.cjs → razor-COBqjWAJ.cjs} +1 -1
- package/dist/{razor-fizwqQUn.js → razor-Q3MoMGDn.js} +1 -1
- package/dist/{regexp-BlBS23LV.js → regexp-BsdKen3m.js} +1 -1
- package/dist/{regexp-BbrbtHcV.cjs → regexp-Cquj00oh.cjs} +1 -1
- package/dist/{rst-uzixnQEN.cjs → rst-B0t1spY-.cjs} +1 -1
- package/dist/{rst-CQ-BOew2.js → rst-DpM5_nag.js} +6 -6
- package/dist/{ruby-DcF3FpOo.cjs → ruby-CsFQlb64.cjs} +1 -1
- package/dist/{ruby-DYscwpKq.js → ruby-kbh8ViY5.js} +12 -12
- package/dist/{sas-xf7cYJ8D.js → sas-BgQhrf78.js} +1 -1
- package/dist/{sas-CQkHM7U4.cjs → sas-CnYUys8b.cjs} +1 -1
- package/dist/{scss-B6SEboBH.cjs → scss-FW7lpUTk.cjs} +1 -1
- package/dist/{scss-D5Ro0FPj.js → scss-NPDrxHVt.js} +2 -2
- package/dist/{shellscript-UM_LESkp.cjs → shellscript-C1Cbf_Wu.cjs} +1 -1
- package/dist/{shellscript-DVhVbKuT.js → shellscript-DhwNgJpI.js} +1 -1
- package/dist/{shellsession-DCV0F4Wc.js → shellsession-BzIHueWc.js} +1 -1
- package/dist/{shellsession-CfBYvvpU.cjs → shellsession-D7Pf_B_j.cjs} +1 -1
- package/dist/{soy-HCmyBkD1.cjs → soy-Bacl__9y.cjs} +1 -1
- package/dist/{soy-DqvPS_mm.js → soy-xHdJtla5.js} +1 -1
- package/dist/{sql-C8Kl76rR.js → sql-AGUE5-dk.js} +1 -1
- package/dist/{sql-B2O4UoSw.cjs → sql-BCbZO9Vk.cjs} +1 -1
- package/dist/{stata-CJiPjcNk.js → stata-BpsgLaw1.js} +1 -1
- package/dist/{stata-B1WKRY4L.cjs → stata-ByZ8yj3l.cjs} +1 -1
- package/dist/{surrealql-1H6TjudE.js → surrealql-CE6SK0JG.js} +1 -1
- package/dist/{surrealql-D34WxIUj.cjs → surrealql-Dfwdqk76.cjs} +1 -1
- package/dist/{svelte-CIN2FBHe.js → svelte-B8Y6hosE.js} +3 -3
- package/dist/{svelte-BdqWwltV.cjs → svelte-DRtnTFsc.cjs} +1 -1
- package/dist/{templ-DRfIS7Yk.cjs → templ-BIgW0e2S.cjs} +1 -1
- package/dist/{templ-DfCxDv8S.js → templ-BofvAMnQ.js} +2 -2
- package/dist/{tex-BTjGzapI.js → tex-CLtxJoaQ.js} +2 -2
- package/dist/{tex-W_Dxzamg.cjs → tex-UEva1VjO.cjs} +1 -1
- package/dist/{ts-tags-T_iDSaWH.cjs → ts-tags-Cv2SdymF.cjs} +1 -1
- package/dist/{ts-tags-CV7DYDTm.js → ts-tags-DRRvATIb.js} +7 -7
- package/dist/{tsx-C9xVNnaW.js → tsx--6NZUZt2.js} +1 -1
- package/dist/{tsx-B3iFrpuZ.cjs → tsx-CRyT9Jau.cjs} +1 -1
- package/dist/{twig-C4i_cRPo.js → twig-BTg98s4P.js} +5 -5
- package/dist/{twig-D914CUNQ.cjs → twig-C8K9fEv7.cjs} +1 -1
- package/dist/types/src/composables/useTheme.d.ts +7 -0
- package/dist/types/src/lib/markdown/sanitizeHtml.d.ts +5 -0
- package/dist/{typescript-Ai8puZIn.cjs → typescript-BbUbA8EZ.cjs} +1 -1
- package/dist/{typescript-Chl77Ui1.js → typescript-DBKp3fLc.js} +1 -1
- package/dist/{typst-BgQE6TAB.js → typst-BMPcWpxF.js} +29 -29
- package/dist/{typst-C6fVPKNq.cjs → typst-wzR7m38K.cjs} +1 -1
- package/dist/{useOpenapi-D3rJQzeG.cjs → useOpenapi-Bt0dpttK.cjs} +1 -1
- package/dist/{useOpenapi-DVLwqpMR.js → useOpenapi-Dr3AneGd.js} +6 -4
- package/dist/vitepress-openapi.client.cjs.js +1 -1
- package/dist/vitepress-openapi.client.es.js +2 -2
- package/dist/vitepress-openapi.css +1 -1
- package/dist/vitepress-openapi.node.cjs.js +1 -1
- package/dist/vitepress-openapi.node.es.js +1 -1
- package/dist/vitepress-openapi.vue.cjs.js +1 -1
- package/dist/vitepress-openapi.vue.es.js +2 -2
- package/dist/{vue-DpVGGK22.js → vue-CPzdKbEl.js} +2121 -1469
- package/dist/{vue-CaajMfVy.cjs → vue-DLzq6csB.cjs} +1 -1
- package/dist/{vue-J95qJkfJ.js → vue-DWAybQg2.js} +6 -6
- package/dist/{vue-Cdo23EVh.cjs → vue-Da82SaTm.cjs} +5 -4
- package/dist/{vue-html-BjrCwjva.js → vue-html-BSam2lRJ.js} +1 -1
- package/dist/{vue-html-CtmhMKZ8.cjs → vue-html-IeY1Py_m.cjs} +1 -1
- package/dist/{vue-vine-DHwm8nhC.cjs → vue-vine-Db6Q7xvd.cjs} +1 -1
- package/dist/{vue-vine-C4hFAX9j.js → vue-vine-icUsAH0H.js} +3 -3
- package/dist/{xml-C1x13bX0.cjs → xml-An_1AySF.cjs} +1 -1
- package/dist/{xml-4tT4oeZd.js → xml-Cj_af9Z1.js} +2 -2
- package/dist/{xsl-ZTs2D31w.js → xsl-D-tBFomZ.js} +1 -1
- package/dist/{xsl-gK25ns76.cjs → xsl-DblyyLAc.cjs} +1 -1
- package/dist/{yaml-BUexFoMb.cjs → yaml-BZ7EODQj.cjs} +1 -1
- package/dist/{yaml-Cr99duBz.js → yaml-D4q2Gm3x.js} +1 -1
- package/package.json +3 -2
- package/src/composables/useMarkdown.ts +8 -2
- package/src/composables/useTheme.ts +12 -0
- package/src/lib/markdown/operationLink.ts +10 -3
- package/src/lib/markdown/sanitizeHtml.ts +92 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./javascript-
|
|
2
|
-
import { t } from "./css-
|
|
3
|
-
import { t as n } from "./scss-
|
|
1
|
+
import { t as e } from "./javascript-CFpHKvG0.js";
|
|
2
|
+
import { t } from "./css-BDew7Z2b.js";
|
|
3
|
+
import { t as n } from "./scss-NPDrxHVt.js";
|
|
4
4
|
import r from "./postcss-BZib8l4b.js";
|
|
5
5
|
import i from "./less-9LYkHheD.js";
|
|
6
6
|
import a from "./stylus-Kh83dApl.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useOpenapi-
|
|
1
|
+
const e=require("./useOpenapi-Bt0dpttK.cjs"),t=require("./java-YSQdp8jH.cjs");var n=e.et({default:()=>i}),r=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),i=[...t.t,r];Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { et as e } from "./useOpenapi-
|
|
2
|
-
import { t } from "./java-
|
|
1
|
+
import { et as e } from "./useOpenapi-Dr3AneGd.js";
|
|
2
|
+
import { t } from "./java-CcAzK28d.js";
|
|
3
3
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/xml.mjs
|
|
4
4
|
var n = /* @__PURE__ */ e({ default: () => i }), r = Object.freeze(JSON.parse("{\"displayName\":\"XML\",\"name\":\"xml\",\"patterns\":[{\"begin\":\"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.xml\"}},\"end\":\"(\\\\?>)\",\"name\":\"meta.tag.preprocessor.xml\",\"patterns\":[{\"match\":\" ([-A-Za-z]+)\",\"name\":\"entity.other.attribute-name.xml\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},{\"begin\":\"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"keyword.other.doctype.xml\"},\"3\":{\"name\":\"variable.language.documentroot.xml\"}},\"end\":\"\\\\s*(>)\",\"name\":\"meta.tag.sgml.doctype.xml\",\"patterns\":[{\"include\":\"#internalSubset\"}]},{\"include\":\"#comments\"},{\"begin\":\"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.xml\"},\"3\":{\"name\":\"entity.name.tag.namespace.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"punctuation.definition.tag.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"entity.name.tag.namespace.xml\"},\"5\":{\"name\":\"punctuation.separator.namespace.xml\"},\"6\":{\"name\":\"entity.name.tag.localname.xml\"},\"7\":{\"name\":\"punctuation.definition.tag.xml\"}},\"name\":\"meta.tag.no-content.xml\",\"patterns\":[{\"include\":\"#tagStuff\"}]},{\"begin\":\"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.namespace.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(/?>)\",\"name\":\"meta.tag.xml\",\"patterns\":[{\"include\":\"#tagStuff\"}]},{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"},{\"begin\":\"<%@\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.xml\"}},\"end\":\"%>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.xml\"}},\"name\":\"source.java-props.embedded.xml\",\"patterns\":[{\"match\":\"page|include|taglib\",\"name\":\"keyword.other.page-props.xml\"}]},{\"begin\":\"<%[!=]?(?!--)\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.xml\"}},\"end\":\"(?!--)%>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.xml\"}},\"name\":\"source.java.embedded.xml\",\"patterns\":[{\"include\":\"source.java\"}]},{\"begin\":\"<!\\\\[CDATA\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"]]>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.unquoted.cdata.xml\"}],\"repository\":{\"EntityDecl\":{\"begin\":\"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"keyword.other.entity.xml\"},\"3\":{\"name\":\"punctuation.definition.entity.xml\"},\"4\":{\"name\":\"variable.language.entity.xml\"},\"5\":{\"name\":\"keyword.other.entitytype.xml\"}},\"end\":\"(>)\",\"patterns\":[{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},\"bare-ampersand\":{\"match\":\"&\",\"name\":\"invalid.illegal.bad-ampersand.xml\"},\"comments\":{\"patterns\":[{\"begin\":\"<%--\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.xml\"},\"end\":\"--%>\",\"name\":\"comment.block.xml\"}},{\"begin\":\"<!--\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.xml\"}},\"end\":\"-->\",\"name\":\"comment.block.xml\",\"patterns\":[{\"begin\":\"--(?!>)\",\"captures\":{\"0\":{\"name\":\"invalid.illegal.bad-comments-or-CDATA.xml\"}}}]}]},\"doublequotedString\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.double.xml\",\"patterns\":[{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"}]},\"entity\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"},\"3\":{\"name\":\"punctuation.definition.constant.xml\"}},\"match\":\"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)\",\"name\":\"constant.character.entity.xml\"},\"internalSubset\":{\"begin\":\"(\\\\[)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"}},\"end\":\"(])\",\"name\":\"meta.internalsubset.xml\",\"patterns\":[{\"include\":\"#EntityDecl\"},{\"include\":\"#parameterEntity\"},{\"include\":\"#comments\"}]},\"parameterEntity\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"},\"3\":{\"name\":\"punctuation.definition.constant.xml\"}},\"match\":\"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)\",\"name\":\"constant.character.parameter-entity.xml\"},\"singlequotedString\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.single.xml\",\"patterns\":[{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"}]},\"tagStuff\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"entity.other.attribute-name.namespace.xml\"},\"2\":{\"name\":\"entity.other.attribute-name.xml\"},\"3\":{\"name\":\"punctuation.separator.namespace.xml\"},\"4\":{\"name\":\"entity.other.attribute-name.localname.xml\"}},\"match\":\"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*=\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]}},\"scopeName\":\"text.xml\",\"embeddedLangs\":[\"java\"]}")), i = [...t, r];
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./xml-
|
|
1
|
+
import { t as e } from "./xml-Cj_af9Z1.js";
|
|
2
2
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/xsl.mjs
|
|
3
3
|
var t = Object.freeze(JSON.parse("{\"displayName\":\"XSL\",\"name\":\"xsl\",\"patterns\":[{\"begin\":\"(<)(xsl)((:))(template)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.namespace.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(>)\",\"name\":\"meta.tag.xml.template\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"entity.other.attribute-name.namespace.xml\"},\"2\":{\"name\":\"entity.other.attribute-name.xml\"},\"3\":{\"name\":\"punctuation.separator.namespace.xml\"},\"4\":{\"name\":\"entity.other.attribute-name.localname.xml\"}},\"match\":\" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},{\"include\":\"text.xml\"}],\"repository\":{\"doublequotedString\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.double.xml\"},\"singlequotedString\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.single.xml\"}},\"scopeName\":\"text.xml.xsl\",\"embeddedLangs\":[\"xml\"]}")), n = [...e, t];
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./xml-
|
|
1
|
+
const e=require("./xml-An_1AySF.cjs");var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)","name":"meta.tag.xml.template","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e.t,t];exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("./useOpenapi-D3rJQzeG.cjs").et({default:()=>t}),t=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
1
|
+
var e=require("./useOpenapi-Bt0dpttK.cjs").et({default:()=>t}),t=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { et as e } from "./useOpenapi-
|
|
1
|
+
import { et as e } from "./useOpenapi-Dr3AneGd.js";
|
|
2
2
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/yaml.mjs
|
|
3
3
|
var t = /* @__PURE__ */ e({ default: () => n }), n = [Object.freeze(JSON.parse("{\"displayName\":\"YAML\",\"fileTypes\":[\"yaml\",\"yml\",\"rviz\",\"reek\",\"clang-format\",\"yaml-tmlanguage\",\"syntax\",\"sublime-syntax\"],\"firstLineMatch\":\"^%YAML( ?1.\\\\d+)?\",\"name\":\"yaml\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#property\"},{\"include\":\"#directive\"},{\"match\":\"^---\",\"name\":\"entity.other.document.begin.yaml\"},{\"match\":\"^\\\\.{3}\",\"name\":\"entity.other.document.end.yaml\"},{\"include\":\"#node\"}],\"repository\":{\"block-collection\":{\"patterns\":[{\"include\":\"#block-sequence\"},{\"include\":\"#block-mapping\"}]},\"block-mapping\":{\"patterns\":[{\"include\":\"#block-pair\"}]},\"block-node\":{\"patterns\":[{\"include\":\"#prototype\"},{\"include\":\"#block-scalar\"},{\"include\":\"#block-collection\"},{\"include\":\"#flow-scalar-plain-out\"},{\"include\":\"#flow-node\"}]},\"block-pair\":{\"patterns\":[{\"begin\":\"\\\\?\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.key-value.begin.yaml\"}},\"end\":\"(?=\\\\?)|^ *(:)|(:)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.separator.key-value.mapping.yaml\"},\"2\":{\"name\":\"invalid.illegal.expected-newline.yaml\"}},\"name\":\"meta.block-mapping.yaml\",\"patterns\":[{\"include\":\"#block-node\"}]},{\"begin\":\"(?=(?:[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\",\"patterns\":[{\"include\":\"#flow-scalar-plain-out-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S\",\"beginCaptures\":{\"0\":{\"name\":\"entity.name.tag.yaml\"}},\"contentName\":\"entity.name.tag.yaml\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\",\"name\":\"string.unquoted.plain.out.yaml\"}]},{\"match\":\":(?=\\\\s|$)\",\"name\":\"punctuation.separator.key-value.mapping.yaml\"}]},\"block-scalar\":{\"begin\":\"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.flow.block-scalar.literal.yaml\"},\"2\":{\"name\":\"keyword.control.flow.block-scalar.folded.yaml\"},\"3\":{\"name\":\"constant.numeric.indentation-indicator.yaml\"},\"4\":{\"name\":\"storage.modifier.chomping-indicator.yaml\"},\"5\":{\"patterns\":[{\"include\":\"#comment\"},{\"match\":\".+\",\"name\":\"invalid.illegal.expected-comment-or-newline.yaml\"}]}},\"end\":\"^(?=\\\\S)|(?!\\\\G)\",\"patterns\":[{\"begin\":\"^( +)(?! )\",\"end\":\"^(?!\\\\1|\\\\s*$)\",\"name\":\"string.unquoted.block.yaml\"}]},\"block-sequence\":{\"match\":\"(-)(?!\\\\S)\",\"name\":\"punctuation.definition.block.sequence.item.yaml\"},\"comment\":{\"begin\":\"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.whitespace.comment.leading.yaml\"}},\"end\":\"(?!\\\\G)\",\"patterns\":[{\"begin\":\"#\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.yaml\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.number-sign.yaml\"}]},\"directive\":{\"begin\":\"^%\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.directive.begin.yaml\"}},\"end\":\"(?=$|[\\\\t ]+($|#))\",\"name\":\"meta.directive.yaml\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.other.directive.yaml.yaml\"},\"2\":{\"name\":\"constant.numeric.yaml-version.yaml\"}},\"match\":\"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)\"},{\"captures\":{\"1\":{\"name\":\"keyword.other.directive.tag.yaml\"},\"2\":{\"name\":\"storage.type.tag-handle.yaml\"},\"3\":{\"name\":\"support.type.tag-prefix.yaml\"}},\"match\":\"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?\"},{\"captures\":{\"1\":{\"name\":\"support.other.directive.reserved.yaml\"},\"2\":{\"name\":\"string.unquoted.directive-name.yaml\"},\"3\":{\"name\":\"string.unquoted.directive-parameter.yaml\"}},\"match\":\"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?\"},{\"match\":\"\\\\S+\",\"name\":\"invalid.illegal.unrecognized.yaml\"}]},\"flow-alias\":{\"captures\":{\"1\":{\"name\":\"keyword.control.flow.alias.yaml\"},\"2\":{\"name\":\"punctuation.definition.alias.yaml\"},\"3\":{\"name\":\"variable.other.alias.yaml\"},\"4\":{\"name\":\"invalid.illegal.character.anchor.yaml\"}},\"match\":\"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?\"},\"flow-collection\":{\"patterns\":[{\"include\":\"#flow-sequence\"},{\"include\":\"#flow-mapping\"}]},\"flow-mapping\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.mapping.begin.yaml\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.mapping.end.yaml\"}},\"name\":\"meta.flow-mapping.yaml\",\"patterns\":[{\"include\":\"#prototype\"},{\"match\":\",\",\"name\":\"punctuation.separator.mapping.yaml\"},{\"include\":\"#flow-pair\"}]},\"flow-node\":{\"patterns\":[{\"include\":\"#prototype\"},{\"include\":\"#flow-alias\"},{\"include\":\"#flow-collection\"},{\"include\":\"#flow-scalar\"}]},\"flow-pair\":{\"patterns\":[{\"begin\":\"\\\\?\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.key-value.begin.yaml\"}},\"end\":\"(?=[],}])\",\"name\":\"meta.flow-pair.explicit.yaml\",\"patterns\":[{\"include\":\"#prototype\"},{\"include\":\"#flow-pair\"},{\"include\":\"#flow-node\"},{\"begin\":\":(?=\\\\s|$|[],\\\\[{}])\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.separator.key-value.mapping.yaml\"}},\"end\":\"(?=[],}])\",\"patterns\":[{\"include\":\"#flow-value\"}]}]},{\"begin\":\"(?=(?:[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\",\"name\":\"meta.flow-pair.key.yaml\",\"patterns\":[{\"include\":\"#flow-scalar-plain-in-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]\",\"beginCaptures\":{\"0\":{\"name\":\"entity.name.tag.yaml\"}},\"contentName\":\"entity.name.tag.yaml\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\",\"name\":\"string.unquoted.plain.in.yaml\"}]},{\"include\":\"#flow-node\"},{\"begin\":\":(?=\\\\s|$|[],\\\\[{}])\",\"captures\":{\"0\":{\"name\":\"punctuation.separator.key-value.mapping.yaml\"}},\"end\":\"(?=[],}])\",\"name\":\"meta.flow-pair.yaml\",\"patterns\":[{\"include\":\"#flow-value\"}]}]},\"flow-scalar\":{\"patterns\":[{\"include\":\"#flow-scalar-double-quoted\"},{\"include\":\"#flow-scalar-single-quoted\"},{\"include\":\"#flow-scalar-plain-in\"}]},\"flow-scalar-double-quoted\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.yaml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.yaml\"}},\"name\":\"string.quoted.double.yaml\",\"patterns\":[{\"match\":\"\\\\\\\\([ \\\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})\",\"name\":\"constant.character.escape.yaml\"},{\"match\":\"\\\\\\\\\\\\n\",\"name\":\"constant.character.escape.double-quoted.newline.yaml\"}]},\"flow-scalar-plain-in\":{\"patterns\":[{\"include\":\"#flow-scalar-plain-in-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\",\"name\":\"string.unquoted.plain.in.yaml\"}]},\"flow-scalar-plain-in-implicit-type\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"constant.language.null.yaml\"},\"2\":{\"name\":\"constant.language.boolean.yaml\"},\"3\":{\"name\":\"constant.numeric.integer.yaml\"},\"4\":{\"name\":\"constant.numeric.float.yaml\"},\"5\":{\"name\":\"constant.other.timestamp.yaml\"},\"6\":{\"name\":\"constant.language.value.yaml\"},\"7\":{\"name\":\"constant.language.merge.yaml\"}},\"match\":\"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\"}]},\"flow-scalar-plain-out\":{\"patterns\":[{\"include\":\"#flow-scalar-plain-out-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\",\"name\":\"string.unquoted.plain.out.yaml\"}]},\"flow-scalar-plain-out-implicit-type\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"constant.language.null.yaml\"},\"2\":{\"name\":\"constant.language.boolean.yaml\"},\"3\":{\"name\":\"constant.numeric.integer.yaml\"},\"4\":{\"name\":\"constant.numeric.float.yaml\"},\"5\":{\"name\":\"constant.other.timestamp.yaml\"},\"6\":{\"name\":\"constant.language.value.yaml\"},\"7\":{\"name\":\"constant.language.merge.yaml\"}},\"match\":\"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\"}]},\"flow-scalar-single-quoted\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.yaml\"}},\"end\":\"'(?!')\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.yaml\"}},\"name\":\"string.quoted.single.yaml\",\"patterns\":[{\"match\":\"''\",\"name\":\"constant.character.escape.single-quoted.yaml\"}]},\"flow-sequence\":{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.sequence.begin.yaml\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.sequence.end.yaml\"}},\"name\":\"meta.flow-sequence.yaml\",\"patterns\":[{\"include\":\"#prototype\"},{\"match\":\",\",\"name\":\"punctuation.separator.sequence.yaml\"},{\"include\":\"#flow-pair\"},{\"include\":\"#flow-node\"}]},\"flow-value\":{\"patterns\":[{\"begin\":\"\\\\G(?![],}])\",\"end\":\"(?=[],}])\",\"name\":\"meta.flow-pair.value.yaml\",\"patterns\":[{\"include\":\"#flow-node\"}]}]},\"node\":{\"patterns\":[{\"include\":\"#block-node\"}]},\"property\":{\"begin\":\"(?=[!\\\\&])\",\"end\":\"(?!\\\\G)\",\"name\":\"meta.property.yaml\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.property.anchor.yaml\"},\"2\":{\"name\":\"punctuation.definition.anchor.yaml\"},\"3\":{\"name\":\"entity.name.type.anchor.yaml\"},\"4\":{\"name\":\"invalid.illegal.character.anchor.yaml\"}},\"match\":\"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?\"},{\"match\":\"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)\",\"name\":\"storage.type.tag-handle.yaml\"},{\"match\":\"\\\\S+\",\"name\":\"invalid.illegal.tag-handle.yaml\"}]},\"prototype\":{\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#property\"}]}},\"scopeName\":\"source.yaml\",\"aliases\":[\"yml\"]}"))];
|
|
4
4
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress-openapi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.16",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^20.19.0 || ^22.13.0 || >=24.0.0"
|
|
7
7
|
},
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
58
|
"markdown-it-link-attributes": "^4.0.1",
|
|
59
|
-
"reka-ui": "^2.10.4"
|
|
59
|
+
"reka-ui": "^2.10.4",
|
|
60
|
+
"xss": "^1.0.17"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@antfu/eslint-config": "^9.3.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import markdownit from 'markdown-it'
|
|
2
2
|
import linkAttributes from 'markdown-it-link-attributes'
|
|
3
3
|
import { operationLink } from '../lib/markdown/operationLink'
|
|
4
|
+
import { sanitizeHtml } from '../lib/markdown/sanitizeHtml'
|
|
4
5
|
import { useTheme } from './useTheme'
|
|
5
6
|
|
|
6
7
|
const RE_EXTERNAL_LINK = /^https?:\/\//
|
|
@@ -8,7 +9,7 @@ const RE_EXTERNAL_LINK = /^https?:\/\//
|
|
|
8
9
|
export function useMarkdown() {
|
|
9
10
|
const theme = useTheme()
|
|
10
11
|
const operationLinkConfig = theme.getOperationLinkConfig()
|
|
11
|
-
const { externalLinksNewTab, config } = theme.getMarkdownConfig()
|
|
12
|
+
const { externalLinksNewTab, config, sanitize = true } = theme.getMarkdownConfig()
|
|
12
13
|
|
|
13
14
|
let md = markdownit({
|
|
14
15
|
html: true,
|
|
@@ -38,9 +39,14 @@ export function useMarkdown() {
|
|
|
38
39
|
md = config(md) || md
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
// Applied to the final output, so it also covers plugins or instances added by `config`.
|
|
43
|
+
const sanitizeOutput = typeof sanitize === 'function'
|
|
44
|
+
? sanitize
|
|
45
|
+
: sanitize === false ? (html: string) => html : sanitizeHtml
|
|
46
|
+
|
|
41
47
|
function render(content: string) {
|
|
42
48
|
// Ensure we always return a valid HTML string even for empty/undefined content.
|
|
43
|
-
return md.render(content || '')
|
|
49
|
+
return sanitizeOutput(md.render(content || ''))
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
return {
|
|
@@ -195,6 +195,12 @@ export interface MarkdownConfig {
|
|
|
195
195
|
operationLink?: OperationLinkConfig | false
|
|
196
196
|
externalLinksNewTab?: boolean
|
|
197
197
|
config?: (md: MarkdownIt) => MarkdownIt | undefined
|
|
198
|
+
/**
|
|
199
|
+
* Sanitize the HTML rendered from Markdown descriptions.
|
|
200
|
+
* `true` (default) uses the built-in sanitizer, `false` disables it (only for fully trusted specs),
|
|
201
|
+
* and a function replaces the built-in sanitizer.
|
|
202
|
+
*/
|
|
203
|
+
sanitize?: boolean | ((html: string) => string)
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
export interface UseThemeConfig {
|
|
@@ -425,6 +431,7 @@ const defaultValues = {
|
|
|
425
431
|
},
|
|
426
432
|
externalLinksNewTab: false,
|
|
427
433
|
config: undefined,
|
|
434
|
+
sanitize: true,
|
|
428
435
|
},
|
|
429
436
|
}
|
|
430
437
|
|
|
@@ -522,6 +529,7 @@ const themeConfig: UseThemeConfig = {
|
|
|
522
529
|
},
|
|
523
530
|
externalLinksNewTab: defaultValues.markdown.externalLinksNewTab,
|
|
524
531
|
config: defaultValues.markdown.config,
|
|
532
|
+
sanitize: defaultValues.markdown.sanitize,
|
|
525
533
|
},
|
|
526
534
|
}
|
|
527
535
|
|
|
@@ -1152,6 +1160,10 @@ export function useTheme(initialConfig: PartialUseThemeConfig = {}) {
|
|
|
1152
1160
|
if (config.config !== undefined) {
|
|
1153
1161
|
markdown.config = config.config
|
|
1154
1162
|
}
|
|
1163
|
+
|
|
1164
|
+
if (config.sanitize !== undefined) {
|
|
1165
|
+
markdown.sanitize = config.sanitize
|
|
1166
|
+
}
|
|
1155
1167
|
}
|
|
1156
1168
|
|
|
1157
1169
|
function getOperationLinkConfig(): OperationLinkConfig | false | undefined {
|
|
@@ -61,14 +61,21 @@ function getOperationTitle(
|
|
|
61
61
|
return title || operation?.summary || operation?.operationId || ''
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
const RE_HTML_ESCAPE = /[&<>"]/g
|
|
65
|
+
const HTML_ESCAPES: Record<string, string> = { '&': '&', '<': '<', '>': '>', '"': '"' }
|
|
66
|
+
|
|
67
|
+
function escapeHtml(value: string): string {
|
|
68
|
+
return value.replace(RE_HTML_ESCAPE, char => HTML_ESCAPES[char])
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
function createOperationLinkHtml(
|
|
65
72
|
href: string,
|
|
66
73
|
method: string,
|
|
67
74
|
title: string,
|
|
68
75
|
): string {
|
|
69
|
-
return `<a href="${href}" class="OAOperationLink group/oaOperationLink">`
|
|
70
|
-
+ `<span class="OAOperationLink-badge OAMethodBadge--${method.toLowerCase()}">${method.toUpperCase()}</span>`
|
|
71
|
-
+ `<span class="OAOperationLink-title">${title}</span>`
|
|
76
|
+
return `<a href="${escapeHtml(href)}" class="OAOperationLink group/oaOperationLink">`
|
|
77
|
+
+ `<span class="OAOperationLink-badge OAMethodBadge--${escapeHtml(method.toLowerCase())}">${escapeHtml(method.toUpperCase())}</span>`
|
|
78
|
+
+ `<span class="OAOperationLink-title">${escapeHtml(title)}</span>`
|
|
72
79
|
+ `</a>`
|
|
73
80
|
}
|
|
74
81
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type * as XSS from 'xss'
|
|
2
|
+
import type { IWhiteList } from 'xss'
|
|
3
|
+
import xssModule from 'xss'
|
|
4
|
+
|
|
5
|
+
// `xss` is a CommonJS module: its helpers are only reliably reachable through the default export.
|
|
6
|
+
const {
|
|
7
|
+
escapeAttrValue,
|
|
8
|
+
FilterXSS,
|
|
9
|
+
friendlyAttrValue,
|
|
10
|
+
getDefaultWhiteList,
|
|
11
|
+
safeAttrValue,
|
|
12
|
+
} = xssModule as unknown as typeof XSS
|
|
13
|
+
|
|
14
|
+
/** Attributes allowed on every allowed tag. */
|
|
15
|
+
const GLOBAL_ATTRIBUTES = ['class', 'id', 'title', 'align', 'target', 'rel', 'style']
|
|
16
|
+
|
|
17
|
+
/** Tags that markdown-it (and common plugins) can emit, missing from the js-xss default whitelist. */
|
|
18
|
+
const EXTRA_TAGS: IWhiteList = {
|
|
19
|
+
input: ['type', 'checked', 'disabled'],
|
|
20
|
+
q: ['cite'],
|
|
21
|
+
dfn: [],
|
|
22
|
+
var: [],
|
|
23
|
+
samp: [],
|
|
24
|
+
wbr: [],
|
|
25
|
+
time: ['datetime'],
|
|
26
|
+
ruby: [],
|
|
27
|
+
rt: [],
|
|
28
|
+
rp: [],
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Extra per-tag attributes markdown-it emits. */
|
|
32
|
+
const EXTRA_TAG_ATTRIBUTES: IWhiteList = {
|
|
33
|
+
ol: ['start', 'type', 'reversed'],
|
|
34
|
+
li: ['value'],
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const RE_DATA_OR_ARIA_ATTRIBUTE = /^(?:data|aria)-[\w-]+$/
|
|
38
|
+
// Control characters and whitespace, ignored by browsers when parsing URLs.
|
|
39
|
+
const RE_URL_IGNORED_CHARS = /[\s\p{Cc}]/gu
|
|
40
|
+
// A URL has a scheme when a colon appears before the first `/`, `?` or `#`.
|
|
41
|
+
const RE_URL_SCHEME = /^[^/?#]*:/
|
|
42
|
+
|
|
43
|
+
function buildWhiteList(): IWhiteList {
|
|
44
|
+
const whiteList: IWhiteList = { ...getDefaultWhiteList(), ...EXTRA_TAGS }
|
|
45
|
+
|
|
46
|
+
for (const [tag, attributes] of Object.entries(EXTRA_TAG_ATTRIBUTES)) {
|
|
47
|
+
whiteList[tag] = [...(whiteList[tag] ?? []), ...(attributes ?? [])]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
for (const tag of Object.keys(whiteList)) {
|
|
51
|
+
whiteList[tag] = [...new Set([...(whiteList[tag] ?? []), ...GLOBAL_ATTRIBUTES])]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return whiteList
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const filter = new FilterXSS({
|
|
58
|
+
whiteList: buildWhiteList(),
|
|
59
|
+
// Remove tags outside the whitelist (keeping their text), and drop the content of these entirely.
|
|
60
|
+
stripIgnoreTag: true,
|
|
61
|
+
stripIgnoreTagBody: ['script', 'style'],
|
|
62
|
+
allowCommentTag: false,
|
|
63
|
+
onIgnoreTagAttr(_tag, name, value) {
|
|
64
|
+
if (RE_DATA_OR_ARIA_ATTRIBUTE.test(name)) {
|
|
65
|
+
return `${name}="${escapeAttrValue(value)}"`
|
|
66
|
+
}
|
|
67
|
+
// Any other attribute (including `on*` event handlers) is removed.
|
|
68
|
+
return undefined
|
|
69
|
+
},
|
|
70
|
+
safeAttrValue(tag, name, value, cssFilter) {
|
|
71
|
+
const safeValue = safeAttrValue(tag, name, value, cssFilter)
|
|
72
|
+
|
|
73
|
+
// js-xss only keeps absolute URLs from a fixed list of schemes and `/`, `./`, `../`, `#` prefixes.
|
|
74
|
+
// Also keep scheme-less relative URLs (e.g. `users/list`, `?page=2`) emitted by Markdown links.
|
|
75
|
+
if ((name === 'href' || name === 'src') && safeValue === '') {
|
|
76
|
+
const url = friendlyAttrValue(value).trim()
|
|
77
|
+
if (url !== '' && !RE_URL_SCHEME.test(url.replace(RE_URL_IGNORED_CHARS, ''))) {
|
|
78
|
+
return escapeAttrValue(url)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return safeValue
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Sanitizes HTML rendered from Markdown: keeps formatting markup (headings, lists, tables, code,
|
|
88
|
+
* links, images, `<details>`, …) and removes scripts, event handlers and unsafe URLs.
|
|
89
|
+
*/
|
|
90
|
+
export function sanitizeHtml(html: string): string {
|
|
91
|
+
return filter.process(html)
|
|
92
|
+
}
|