restructuredtext-GRMUGONS.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.js
  3. var conf = {
  4. brackets: [
  5. ["{", "}"],
  6. ["[", "]"],
  7. ["(", ")"]
  8. ],
  9. autoClosingPairs: [
  10. { open: "{", close: "}" },
  11. { open: "[", close: "]" },
  12. { open: "(", close: ")" },
  13. { open: "<", close: ">", notIn: ["string"] }
  14. ],
  15. surroundingPairs: [
  16. { open: "(", close: ")" },
  17. { open: "[", close: "]" },
  18. { open: "`", close: "`" }
  19. ],
  20. folding: {
  21. markers: {
  22. start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
  23. end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
  24. }
  25. }
  26. };
  27. var language = {
  28. defaultToken: "",
  29. tokenPostfix: ".rst",
  30. control: /[\\`*_\[\]{}()#+\-\.!]/,
  31. escapes: /\\(?:@control)/,
  32. empty: [
  33. "area",
  34. "base",
  35. "basefont",
  36. "br",
  37. "col",
  38. "frame",
  39. "hr",
  40. "img",
  41. "input",
  42. "isindex",
  43. "link",
  44. "meta",
  45. "param"
  46. ],
  47. alphanumerics: /[A-Za-z0-9]/,
  48. simpleRefNameWithoutBq: /(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,
  49. simpleRefName: /(?:`@phrase`|@simpleRefNameWithoutBq)/,
  50. phrase: /@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,
  51. citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
  52. blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
  53. precedingChars: /(?:[ -:/'"<([{])/,
  54. followingChars: /(?:[ -.,:;!?/'")\]}>]|$)/,
  55. punctuation: /(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,
  56. tokenizer: {
  57. root: [
  58. [/^(@punctuation{3,}$){1,1}?/, "keyword"],
  59. [/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/, "keyword"],
  60. [/([ ]::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
  61. [/(::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
  62. { include: "@tables" },
  63. { include: "@explicitMarkupBlocks" },
  64. { include: "@inlineMarkup" }
  65. ],
  66. explicitMarkupBlocks: [
  67. { include: "@citations" },
  68. { include: "@footnotes" },
  69. [
  70. /^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,
  71. [{ token: "", next: "subsequentLines" }, "keyword", "", ""]
  72. ],
  73. [
  74. /^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,
  75. [{ token: "", next: "hyperlinks" }, "", "", "string.link", "", "", "string.link"]
  76. ],
  77. [
  78. /^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,
  79. [{ token: "", next: "subsequentLines" }, "", "", "", "string.link"]
  80. ],
  81. [/^(__\s+)(.+)/, ["", "string.link"]],
  82. [
  83. /^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,
  84. [{ token: "", next: "subsequentLines" }, "", "string.link", "", "keyword", ""],
  85. "@rawBlocks"
  86. ],
  87. [/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/, ["", "string.link", ""]],
  88. [/^(\.\.)([ ].*)$/, [{ token: "", next: "@comments" }, "comment"]]
  89. ],
  90. inlineMarkup: [
  91. { include: "@citationsReference" },
  92. { include: "@footnotesReference" },
  93. [/(@simpleRefName)(_{1,2})/, ["string.link", ""]],
  94. [/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/, ["", "string.link", "", "string.link", "", "", ""]],
  95. [/\*\*([^\\*]|\*(?!\*))+\*\*/, "strong"],
  96. [/\*[^*]+\*/, "emphasis"],
  97. [/(``)((?:[^`]|\`(?!`))+)(``)/, ["", "keyword", ""]],
  98. [/(__\s+)(.+)/, ["", "keyword"]],
  99. [/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/, ["", "keyword", "", "", ""]],
  100. [/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/, ["", "", "", "keyword", ""]],
  101. [/(`)([^`]+)(`)/, ""],
  102. [/(_`)(@phrase)(`)/, ["", "string.link", ""]]
  103. ],
  104. citations: [
  105. [
  106. /^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,
  107. [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
  108. ]
  109. ],
  110. citationsReference: [[/(\[)(@citationName)(\]_)/, ["", "string.link", ""]]],
  111. footnotes: [
  112. [
  113. /^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,
  114. [{ token: "", next: "@subsequentLines" }, "string.link", ""]
  115. ],
  116. [
  117. /^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,
  118. [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
  119. ],
  120. [
  121. /^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,
  122. [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
  123. ]
  124. ],
  125. footnotesReference: [
  126. [/(\[)([0-9]+)(\])(_)/, ["", "string.link", "", ""]],
  127. [/(\[)(#@simpleRefName?)(\])(_)/, ["", "string.link", "", ""]],
  128. [/(\[)(\*)(\])(_)/, ["", "string.link", "", ""]]
  129. ],
  130. blankLineOfLiteralBlocks: [
  131. [/^$/, "", "@subsequentLinesOfLiteralBlocks"],
  132. [/^.*$/, "", "@pop"]
  133. ],
  134. subsequentLinesOfLiteralBlocks: [
  135. [/(@blockLiteralStart+)(.*)/, ["keyword", ""]],
  136. [/^(?!blockLiteralStart)/, "", "@popall"]
  137. ],
  138. subsequentLines: [
  139. [/^[\s]+.*/, ""],
  140. [/^(?!\s)/, "", "@pop"]
  141. ],
  142. hyperlinks: [
  143. [/^[\s]+.*/, "string.link"],
  144. [/^(?!\s)/, "", "@pop"]
  145. ],
  146. comments: [
  147. [/^[\s]+.*/, "comment"],
  148. [/^(?!\s)/, "", "@pop"]
  149. ],
  150. tables: [
  151. [/\+-[+-]+/, "keyword"],
  152. [/\+=[+=]+/, "keyword"]
  153. ]
  154. }
  155. };
  156. export {
  157. conf,
  158. language
  159. };
  160. /*! Bundled license information:
  161. monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.js:
  162. (*!-----------------------------------------------------------------------------
  163. * Copyright (c) Microsoft Corporation. All rights reserved.
  164. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  165. * Released under the MIT license
  166. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  167. *-----------------------------------------------------------------------------*)
  168. */
  169. //# sourceMappingURL=restructuredtext-GRMUGONS.js.map