markdown-BMWJOCAA.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.js
  3. var conf = {
  4. comments: {
  5. blockComment: ["<!--", "-->"]
  6. },
  7. brackets: [
  8. ["{", "}"],
  9. ["[", "]"],
  10. ["(", ")"]
  11. ],
  12. autoClosingPairs: [
  13. { open: "{", close: "}" },
  14. { open: "[", close: "]" },
  15. { open: "(", close: ")" },
  16. { open: "<", close: ">", notIn: ["string"] }
  17. ],
  18. surroundingPairs: [
  19. { open: "(", close: ")" },
  20. { open: "[", close: "]" },
  21. { open: "`", close: "`" }
  22. ],
  23. folding: {
  24. markers: {
  25. start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
  26. end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
  27. }
  28. }
  29. };
  30. var language = {
  31. defaultToken: "",
  32. tokenPostfix: ".md",
  33. control: /[\\`*_\[\]{}()#+\-\.!]/,
  34. noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
  35. escapes: /\\(?:@control)/,
  36. jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
  37. empty: [
  38. "area",
  39. "base",
  40. "basefont",
  41. "br",
  42. "col",
  43. "frame",
  44. "hr",
  45. "img",
  46. "input",
  47. "isindex",
  48. "link",
  49. "meta",
  50. "param"
  51. ],
  52. tokenizer: {
  53. root: [
  54. [/^\s*\|/, "@rematch", "@table_header"],
  55. [/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ["white", "keyword", "keyword", "keyword"]],
  56. [/^\s*(=+|\-+)\s*$/, "keyword"],
  57. [/^\s*((\*[ ]?)+)\s*$/, "meta.separator"],
  58. [/^\s*>+/, "comment"],
  59. [/^\s*([\*\-+:]|\d+\.)\s/, "keyword"],
  60. [/^(\t|[ ]{4})[^ ].*$/, "string"],
  61. [/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: "string", next: "@codeblock" }],
  62. [
  63. /^\s*```\s*((?:\w|[\/\-#])+).*$/,
  64. { token: "string", next: "@codeblockgh", nextEmbedded: "$1" }
  65. ],
  66. [/^\s*```\s*$/, { token: "string", next: "@codeblock" }],
  67. { include: "@linecontent" }
  68. ],
  69. table_header: [
  70. { include: "@table_common" },
  71. [/[^\|]+/, "keyword.table.header"]
  72. ],
  73. table_body: [{ include: "@table_common" }, { include: "@linecontent" }],
  74. table_common: [
  75. [/\s*[\-:]+\s*/, { token: "keyword", switchTo: "table_body" }],
  76. [/^\s*\|/, "keyword.table.left"],
  77. [/^\s*[^\|]/, "@rematch", "@pop"],
  78. [/^\s*$/, "@rematch", "@pop"],
  79. [
  80. /\|/,
  81. {
  82. cases: {
  83. "@eos": "keyword.table.right",
  84. "@default": "keyword.table.middle"
  85. }
  86. }
  87. ]
  88. ],
  89. codeblock: [
  90. [/^\s*~~~\s*$/, { token: "string", next: "@pop" }],
  91. [/^\s*```\s*$/, { token: "string", next: "@pop" }],
  92. [/.*$/, "variable.source"]
  93. ],
  94. codeblockgh: [
  95. [/```\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
  96. [/[^`]+/, "variable.source"]
  97. ],
  98. linecontent: [
  99. [/&\w+;/, "string.escape"],
  100. [/@escapes/, "escape"],
  101. [/\b__([^\\_]|@escapes|_(?!_))+__\b/, "strong"],
  102. [/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/, "strong"],
  103. [/\b_[^_]+_\b/, "emphasis"],
  104. [/\*([^\\*]|@escapes)+\*/, "emphasis"],
  105. [/`([^\\`]|@escapes)+`/, "variable"],
  106. [/\{+[^}]+\}+/, "string.target"],
  107. [/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ["string.link", "", "string.link"]],
  108. [/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, "string.link"],
  109. { include: "html" }
  110. ],
  111. html: [
  112. [/<(\w+)\/>/, "tag"],
  113. [
  114. /<(\w+)(\-|\w)*/,
  115. {
  116. cases: {
  117. "@empty": { token: "tag", next: "@tag.$1" },
  118. "@default": { token: "tag", next: "@tag.$1" }
  119. }
  120. }
  121. ],
  122. [/<\/(\w+)(\-|\w)*\s*>/, { token: "tag" }],
  123. [/<!--/, "comment", "@comment"]
  124. ],
  125. comment: [
  126. [/[^<\-]+/, "comment.content"],
  127. [/-->/, "comment", "@pop"],
  128. [/<!--/, "comment.content.invalid"],
  129. [/[<\-]/, "comment.content"]
  130. ],
  131. tag: [
  132. [/[ \t\r\n]+/, "white"],
  133. [
  134. /(type)(\s*=\s*)(")([^"]+)(")/,
  135. [
  136. "attribute.name.html",
  137. "delimiter.html",
  138. "string.html",
  139. { token: "string.html", switchTo: "@tag.$S2.$4" },
  140. "string.html"
  141. ]
  142. ],
  143. [
  144. /(type)(\s*=\s*)(')([^']+)(')/,
  145. [
  146. "attribute.name.html",
  147. "delimiter.html",
  148. "string.html",
  149. { token: "string.html", switchTo: "@tag.$S2.$4" },
  150. "string.html"
  151. ]
  152. ],
  153. [/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/, ["attribute.name.html", "delimiter.html", "string.html"]],
  154. [/\w+/, "attribute.name.html"],
  155. [/\/>/, "tag", "@pop"],
  156. [
  157. />/,
  158. {
  159. cases: {
  160. "$S2==style": {
  161. token: "tag",
  162. switchTo: "embeddedStyle",
  163. nextEmbedded: "text/css"
  164. },
  165. "$S2==script": {
  166. cases: {
  167. $S3: {
  168. token: "tag",
  169. switchTo: "embeddedScript",
  170. nextEmbedded: "$S3"
  171. },
  172. "@default": {
  173. token: "tag",
  174. switchTo: "embeddedScript",
  175. nextEmbedded: "text/javascript"
  176. }
  177. }
  178. },
  179. "@default": { token: "tag", next: "@pop" }
  180. }
  181. }
  182. ]
  183. ],
  184. embeddedStyle: [
  185. [/[^<]+/, ""],
  186. [/<\/style\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
  187. [/</, ""]
  188. ],
  189. embeddedScript: [
  190. [/[^<]+/, ""],
  191. [/<\/script\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
  192. [/</, ""]
  193. ]
  194. }
  195. };
  196. export {
  197. conf,
  198. language
  199. };
  200. /*! Bundled license information:
  201. monaco-editor/esm/vs/basic-languages/markdown/markdown.js:
  202. (*!-----------------------------------------------------------------------------
  203. * Copyright (c) Microsoft Corporation. All rights reserved.
  204. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  205. * Released under the MIT license
  206. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  207. *-----------------------------------------------------------------------------*)
  208. */
  209. //# sourceMappingURL=markdown-BMWJOCAA.js.map