@openui5/sap.ui.codeeditor 1.120.6 → 1.121.0

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.
Files changed (457) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +2 -2
  4. package/src/sap/ui/codeeditor/.library +2 -2
  5. package/src/sap/ui/codeeditor/CodeEditor.js +41 -27
  6. package/src/sap/ui/codeeditor/js/ace/ace.js +16262 -16597
  7. package/src/sap/ui/codeeditor/js/ace/css/ace.css +358 -86
  8. package/src/sap/ui/codeeditor/js/ace/css/ambiance-3.png +0 -0
  9. package/src/sap/ui/codeeditor/js/ace/css/chrome-2.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-1.png +0 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-2.png +0 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-1.png +0 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-2.png +0 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-1.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-2.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/clouds-2.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/clouds_midnight-2.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/cobalt-2.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/crimson_editor-2.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/dawn-2.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/dracula-2.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/dreamweaver-2.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/eclipse-2.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/github-2.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/github_dark-1.png +0 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/github_dark-2.png +0 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/gob-2.png +0 -0
  28. package/src/sap/ui/codeeditor/js/ace/css/gruvbox-2.png +0 -0
  29. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_dark_hard-1.png +0 -0
  30. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-1.png +0 -0
  31. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-2.png +0 -0
  32. package/src/sap/ui/codeeditor/js/ace/css/idle_fingers-2.png +0 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/iplastic-3.png +0 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-1.png +0 -0
  35. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-2.png +0 -0
  36. package/src/sap/ui/codeeditor/js/ace/css/kr_theme-2.png +0 -0
  37. package/src/sap/ui/codeeditor/js/ace/css/kuroir-1.png +0 -0
  38. package/src/sap/ui/codeeditor/js/ace/css/kuroir-2.png +0 -0
  39. package/src/sap/ui/codeeditor/js/ace/css/main-10.png +0 -0
  40. package/src/sap/ui/codeeditor/js/ace/css/main-11.png +0 -0
  41. package/src/sap/ui/codeeditor/js/ace/css/main-12.png +0 -0
  42. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  43. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  44. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  45. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  46. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  47. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  48. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  49. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  50. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  51. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  52. package/src/sap/ui/codeeditor/js/ace/css/main-22.svg +1 -0
  53. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  54. package/src/sap/ui/codeeditor/js/ace/css/main-5.svg +7 -0
  55. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +7 -0
  56. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +9 -0
  57. package/src/sap/ui/codeeditor/js/ace/css/main-8.png +0 -0
  58. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +4 -0
  59. package/src/sap/ui/codeeditor/js/ace/css/main-9.png +0 -0
  60. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +4 -0
  61. package/src/sap/ui/codeeditor/js/ace/css/merbivore-2.png +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/css/merbivore_soft-2.png +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/css/mono_industrial-2.png +0 -0
  64. package/src/sap/ui/codeeditor/js/ace/css/monokai-2.png +0 -0
  65. package/src/sap/ui/codeeditor/js/ace/css/one_dark-2.png +0 -0
  66. package/src/sap/ui/codeeditor/js/ace/css/pastel_on_dark-2.png +0 -0
  67. package/src/sap/ui/codeeditor/js/ace/css/solarized_dark-2.png +0 -0
  68. package/src/sap/ui/codeeditor/js/ace/css/solarized_light-2.png +0 -0
  69. package/src/sap/ui/codeeditor/js/ace/css/sqlserver-2.png +0 -0
  70. package/src/sap/ui/codeeditor/js/ace/css/terminal-2.png +0 -0
  71. package/src/sap/ui/codeeditor/js/ace/css/textmate-2.png +0 -0
  72. package/src/sap/ui/codeeditor/js/ace/css/theme/ambiance.css +120 -68
  73. package/src/sap/ui/codeeditor/js/ace/css/theme/chaos.css +79 -66
  74. package/src/sap/ui/codeeditor/js/ace/css/theme/chrome.css +82 -43
  75. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_day.css +160 -0
  76. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night.css +146 -0
  77. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night_low_color.css +134 -0
  78. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds.css +59 -31
  79. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds_midnight.css +60 -32
  80. package/src/sap/ui/codeeditor/js/ace/css/theme/cobalt.css +71 -38
  81. package/src/sap/ui/codeeditor/js/ace/css/theme/crimson_editor.css +79 -42
  82. package/src/sap/ui/codeeditor/js/ace/css/theme/dawn.css +70 -40
  83. package/src/sap/ui/codeeditor/js/ace/css/theme/dracula.css +95 -49
  84. package/src/sap/ui/codeeditor/js/ace/css/theme/dreamweaver.css +95 -49
  85. package/src/sap/ui/codeeditor/js/ace/css/theme/eclipse.css +62 -33
  86. package/src/sap/ui/codeeditor/js/ace/css/theme/github.css +71 -38
  87. package/src/sap/ui/codeeditor/js/ace/css/theme/github_dark.css +134 -0
  88. package/src/sap/ui/codeeditor/js/ace/css/theme/gob.css +68 -38
  89. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox.css +54 -28
  90. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_dark_hard.css +163 -0
  91. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_light_hard.css +167 -0
  92. package/src/sap/ui/codeeditor/js/ace/css/theme/idle_fingers.css +62 -34
  93. package/src/sap/ui/codeeditor/js/ace/css/theme/iplastic.css +76 -45
  94. package/src/sap/ui/codeeditor/js/ace/css/theme/katzenmilch.css +91 -53
  95. package/src/sap/ui/codeeditor/js/ace/css/theme/kr_theme.css +67 -36
  96. package/src/sap/ui/codeeditor/js/ace/css/theme/kuroir.css +43 -17
  97. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore.css +57 -31
  98. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore_soft.css +57 -31
  99. package/src/sap/ui/codeeditor/js/ace/css/theme/mono_industrial.css +66 -36
  100. package/src/sap/ui/codeeditor/js/ace/css/theme/monokai.css +63 -35
  101. package/src/sap/ui/codeeditor/js/ace/css/theme/nord_dark.css +55 -29
  102. package/src/sap/ui/codeeditor/js/ace/css/theme/one_dark.css +88 -47
  103. package/src/sap/ui/codeeditor/js/ace/css/theme/pastel_on_dark.css +70 -38
  104. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +52 -28
  105. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_light.css +55 -29
  106. package/src/sap/ui/codeeditor/js/ace/css/theme/sqlserver.css +90 -48
  107. package/src/sap/ui/codeeditor/js/ace/css/theme/terminal.css +64 -34
  108. package/src/sap/ui/codeeditor/js/ace/css/theme/textmate.css +82 -43
  109. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow.css +61 -33
  110. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night.css +61 -33
  111. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_blue.css +59 -32
  112. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_bright.css +71 -40
  113. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_eighties.css +61 -33
  114. package/src/sap/ui/codeeditor/js/ace/css/theme/twilight.css +66 -36
  115. package/src/sap/ui/codeeditor/js/ace/css/theme/vibrant_ink.css +59 -32
  116. package/src/sap/ui/codeeditor/js/ace/css/theme/xcode.css +54 -28
  117. package/src/sap/ui/codeeditor/js/ace/css/tomorrow-2.png +0 -0
  118. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night-2.png +0 -0
  119. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_blue-2.png +0 -0
  120. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_bright-2.png +0 -0
  121. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_eighties-2.png +0 -0
  122. package/src/sap/ui/codeeditor/js/ace/css/twilight-2.png +0 -0
  123. package/src/sap/ui/codeeditor/js/ace/css/vibrant_ink-2.png +0 -0
  124. package/src/sap/ui/codeeditor/js/ace/css/xcode-2.png +0 -0
  125. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +90 -91
  126. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +39 -75
  127. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +457 -0
  128. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +47 -97
  129. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +496 -552
  130. package/src/sap/ui/codeeditor/js/ace/ext-hardwrap.js +47 -16
  131. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +3269 -0
  132. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +45 -105
  133. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +1438 -1128
  134. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +8 -16
  135. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +198 -185
  136. package/src/sap/ui/codeeditor/js/ace/ext-options.js +405 -443
  137. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +1682 -1508
  138. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +26 -28
  139. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +160 -332
  140. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +409 -446
  141. package/src/sap/ui/codeeditor/js/ace/ext-simple_tokenizer.js +45 -0
  142. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +4 -10
  143. package/src/sap/ui/codeeditor/js/ace/ext-split.js +41 -63
  144. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +19 -27
  145. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +45 -41
  146. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +62 -83
  147. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +442 -551
  148. package/src/sap/ui/codeeditor/js/ace/keybinding-sublime.js +338 -351
  149. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +5242 -4758
  150. package/src/sap/ui/codeeditor/js/ace/keybinding-vscode.js +228 -235
  151. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +72 -93
  152. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +136 -164
  153. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +109 -150
  154. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +45 -74
  155. package/src/sap/ui/codeeditor/js/ace/mode-alda.js +77 -109
  156. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +196 -241
  157. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +192 -247
  158. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +56 -102
  159. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +85 -95
  160. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +120 -158
  161. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +233 -298
  162. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +78 -101
  163. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +2414 -0
  164. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +80 -116
  165. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +74 -105
  166. package/src/sap/ui/codeeditor/js/ace/mode-bibtex.js +318 -0
  167. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +72 -115
  168. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +171 -257
  169. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +97 -115
  170. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +126 -119
  171. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +48 -67
  172. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +203 -268
  173. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +1029 -1276
  174. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +337 -393
  175. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +127 -216
  176. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +1539 -1569
  177. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +786 -898
  178. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +184 -237
  179. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +37 -37
  180. package/src/sap/ui/codeeditor/js/ace/mode-css.js +293 -384
  181. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +1019 -1262
  182. package/src/sap/ui/codeeditor/js/ace/mode-cuttlefish.js +56 -0
  183. package/src/sap/ui/codeeditor/js/ace/mode-d.js +163 -233
  184. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +330 -427
  185. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +20 -38
  186. package/src/sap/ui/codeeditor/js/ace/mode-django.js +1032 -1271
  187. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +211 -284
  188. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +131 -200
  189. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +408 -349
  190. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +89 -125
  191. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +47 -62
  192. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +1350 -1666
  193. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +349 -407
  194. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +136 -168
  195. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +707 -881
  196. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +164 -0
  197. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +128 -172
  198. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +177 -246
  199. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +92 -131
  200. package/src/sap/ui/codeeditor/js/ace/mode-fsl.js +91 -124
  201. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +813 -748
  202. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +52 -71
  203. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +105 -119
  204. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +12 -22
  205. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +184 -289
  206. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +686 -623
  207. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +167 -239
  208. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +48 -88
  209. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +577 -471
  210. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +1062 -1026
  211. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +1061 -1305
  212. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +199 -255
  213. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +81 -87
  214. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +111 -184
  215. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +164 -199
  216. package/src/sap/ui/codeeditor/js/ace/mode-html.js +1009 -1239
  217. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +1402 -1705
  218. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +1390 -1706
  219. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +58 -82
  220. package/src/sap/ui/codeeditor/js/ace/mode-io.js +85 -123
  221. package/src/sap/ui/codeeditor/js/ace/mode-ion.js +477 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +109 -162
  223. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +1339 -1344
  224. package/src/sap/ui/codeeditor/js/ace/mode-java.js +710 -498
  225. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +441 -354
  226. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +270 -0
  227. package/src/sap/ui/codeeditor/js/ace/mode-json.js +93 -147
  228. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +128 -180
  229. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +58 -112
  230. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +1045 -865
  231. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +158 -190
  232. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +121 -194
  233. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +128 -177
  234. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +262 -614
  235. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +94 -138
  236. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +1120 -1366
  237. package/src/sap/ui/codeeditor/js/ace/mode-less.js +342 -442
  238. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +1353 -1414
  239. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +65 -73
  240. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +217 -224
  241. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +97 -142
  242. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +187 -227
  243. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +99 -155
  244. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +152 -211
  245. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +1167 -1470
  246. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +25 -34
  247. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +244 -282
  248. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +1858 -2177
  249. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +964 -1007
  250. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +197 -221
  251. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +127 -163
  252. package/src/sap/ui/codeeditor/js/ace/mode-mediawiki.js +464 -476
  253. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +90 -140
  254. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +101 -134
  255. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +63 -75
  256. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +537 -576
  257. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +85 -102
  258. package/src/sap/ui/codeeditor/js/ace/mode-nasal.js +513 -0
  259. package/src/sap/ui/codeeditor/js/ace/mode-nginx.js +119 -155
  260. package/src/sap/ui/codeeditor/js/ace/mode-nim.js +159 -197
  261. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +283 -375
  262. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +139 -172
  263. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +1138 -1378
  264. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +400 -514
  265. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +77 -120
  266. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +449 -0
  267. package/src/sap/ui/codeeditor/js/ace/mode-partiql.js +750 -0
  268. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +28 -47
  269. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +122 -185
  270. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +974 -851
  271. package/src/sap/ui/codeeditor/js/ace/mode-php.js +2282 -1502
  272. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +2463 -1696
  273. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +133 -165
  274. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +5 -10
  275. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +268 -0
  276. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +332 -183
  277. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +168 -234
  278. package/src/sap/ui/codeeditor/js/ace/mode-prisma.js +292 -324
  279. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +180 -246
  280. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +26 -37
  281. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +232 -327
  282. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +320 -0
  283. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +68 -120
  284. package/src/sap/ui/codeeditor/js/ace/mode-python.js +338 -370
  285. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +244 -279
  286. package/src/sap/ui/codeeditor/js/ace/mode-r.js +295 -220
  287. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +356 -433
  288. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +1130 -1374
  289. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +214 -171
  290. package/src/sap/ui/codeeditor/js/ace/mode-red.js +212 -274
  291. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +181 -220
  292. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +1325 -1443
  293. package/src/sap/ui/codeeditor/js/ace/mode-robot.js +168 -0
  294. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +217 -229
  295. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +338 -420
  296. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +258 -155
  297. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +349 -0
  298. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +257 -309
  299. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +127 -191
  300. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +572 -468
  301. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +104 -126
  302. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +181 -228
  303. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +364 -472
  304. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +204 -266
  305. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +477 -405
  306. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +2631 -3161
  307. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +1075 -1334
  308. package/src/sap/ui/codeeditor/js/ace/mode-smithy.js +276 -327
  309. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +78 -102
  310. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +1251 -1548
  311. package/src/sap/ui/codeeditor/js/ace/mode-space.js +47 -63
  312. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +139 -171
  313. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +77 -133
  314. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +138 -192
  315. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +306 -338
  316. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +642 -794
  317. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +96 -150
  318. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +151 -200
  319. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +78 -132
  320. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +148 -96
  321. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +45 -70
  322. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +63 -87
  323. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +462 -384
  324. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +119 -151
  325. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +1099 -1350
  326. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +455 -376
  327. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +382 -505
  328. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +231 -264
  329. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +1116 -1388
  330. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +61 -81
  331. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +57 -79
  332. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +1046 -1292
  333. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +525 -417
  334. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +182 -389
  335. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +58 -112
  336. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +202 -137
  337. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +237 -274
  338. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +5 -34
  339. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +5 -160
  340. package/src/sap/ui/codeeditor/js/ace/snippets/astro.js +9 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/bibtex.js +9 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +5 -134
  343. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +5 -93
  344. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +5 -98
  345. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +5 -13
  346. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +5 -50
  347. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +5 -970
  348. package/src/sap/ui/codeeditor/js/ace/snippets/cuttlefish.js +9 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +5 -86
  350. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +5 -14
  351. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +5 -111
  352. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +5 -22
  353. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +8 -246
  354. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +5 -163
  355. package/src/sap/ui/codeeditor/js/ace/snippets/flix.js +9 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/fsl.js +6 -4
  357. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +5 -1707
  358. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +5 -35
  359. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +5 -23
  360. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +5 -85
  361. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +5 -856
  362. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +1 -3
  363. package/src/sap/ui/codeeditor/js/ace/snippets/ion.js +9 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +5 -243
  365. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +5 -198
  366. package/src/sap/ui/codeeditor/js/ace/snippets/jexl.js +9 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +44 -41
  368. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +5 -102
  369. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +5 -884
  370. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +5 -1235
  371. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +5 -24
  372. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +5 -7
  373. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +5 -91
  374. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +5 -12
  375. package/src/sap/ui/codeeditor/js/ace/snippets/nasal.js +9 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/odin.js +9 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/partiql.js +9 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +5 -350
  379. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +5 -386
  380. package/src/sap/ui/codeeditor/js/ace/snippets/plsql.js +9 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/prql.js +9 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +5 -161
  383. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +5 -124
  384. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +5 -6
  385. package/src/sap/ui/codeeditor/js/ace/snippets/robot.js +16 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +5 -25
  387. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +5 -931
  388. package/src/sap/ui/codeeditor/js/ace/snippets/sac.js +9 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +5 -86
  390. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +5 -12
  391. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +5 -29
  392. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +5 -72
  393. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +5 -95
  394. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +5 -193
  395. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +5 -33
  396. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +1 -2
  397. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +5 -31
  398. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +5 -87
  399. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +44 -41
  400. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +5 -172
  401. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +5 -150
  402. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +6 -123
  403. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_day.js +19 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night.js +18 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night_low_color.js +18 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +6 -90
  407. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +6 -91
  408. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +6 -108
  409. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +6 -113
  410. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +6 -103
  411. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +6 -122
  412. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +7 -137
  413. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +6 -92
  414. package/src/sap/ui/codeeditor/js/ace/theme-github.js +7 -99
  415. package/src/sap/ui/codeeditor/js/ace/theme-github_dark.js +18 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +6 -107
  417. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +5 -76
  418. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_dark_hard.js +18 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_light_hard.js +18 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +6 -91
  421. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +6 -116
  422. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +6 -116
  423. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +6 -99
  424. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +6 -56
  425. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +6 -90
  426. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +6 -91
  427. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +6 -102
  428. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +6 -100
  429. package/src/sap/ui/codeeditor/js/ace/theme-nord_dark.js +6 -89
  430. package/src/sap/ui/codeeditor/js/ace/theme-one_dark.js +10 -131
  431. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +6 -103
  432. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +6 -83
  433. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +6 -86
  434. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +6 -133
  435. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +6 -109
  436. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +3 -124
  437. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +6 -103
  438. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +6 -103
  439. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +6 -101
  440. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +6 -116
  441. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +6 -103
  442. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +6 -104
  443. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +6 -89
  444. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +6 -83
  445. package/src/sap/ui/codeeditor/js/ace/worker-base.js +516 -595
  446. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +496 -575
  447. package/src/sap/ui/codeeditor/js/ace/worker-css.js +501 -578
  448. package/src/sap/ui/codeeditor/js/ace/worker-html.js +515 -584
  449. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +2964 -2551
  450. package/src/sap/ui/codeeditor/js/ace/worker-json.js +496 -575
  451. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +497 -576
  452. package/src/sap/ui/codeeditor/js/ace/worker-php.js +2906 -2795
  453. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +496 -575
  454. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +496 -575
  455. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +5851 -0
  456. package/src/sap/ui/codeeditor/library.js +6 -5
  457. package/LICENSES/BSD-2-Clause.txt +0 -22
@@ -1,90 +1,154 @@
1
- ace.define("ace/mode/doc_comment_highlight_rules",[], function(require, exports, module) {
2
- "use strict";
3
-
1
+ ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
4
2
  var oop = require("../lib/oop");
5
3
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
-
7
- var DocCommentHighlightRules = function() {
4
+ var JsDocCommentHighlightRules = function () {
8
5
  this.$rules = {
9
- "start" : [ {
10
- token : "comment.doc.tag",
11
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
12
- },
13
- DocCommentHighlightRules.getTagRule(),
14
- {
15
- defaultToken : "comment.doc",
16
- caseInsensitive: true
17
- }]
6
+ "start": [
7
+ {
8
+ token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
9
+ regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
10
+ push: [
11
+ {
12
+ token: "lparen.doc",
13
+ regex: "{",
14
+ push: [
15
+ {
16
+ include: "doc-syntax"
17
+ }, {
18
+ token: "rparen.doc",
19
+ regex: "}|(?=$)",
20
+ next: "pop"
21
+ }
22
+ ]
23
+ }, {
24
+ token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
25
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
26
+ next: "pop"
27
+ }, {
28
+ token: "rparen.doc",
29
+ regex: "}|(?=$)",
30
+ next: "pop"
31
+ }, {
32
+ include: "doc-syntax"
33
+ }, {
34
+ defaultToken: "text.doc"
35
+ }
36
+ ]
37
+ }, {
38
+ token: ["comment.doc.tag", "text.doc", "lparen.doc"],
39
+ regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
40
+ + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
41
+ push: [
42
+ {
43
+ token: "lparen.doc",
44
+ regex: "{",
45
+ push: [
46
+ {
47
+ include: "doc-syntax"
48
+ }, {
49
+ token: "rparen.doc",
50
+ regex: "}|(?=$)",
51
+ next: "pop"
52
+ }
53
+ ]
54
+ }, {
55
+ token: "rparen.doc",
56
+ regex: "}|(?=$)",
57
+ next: "pop"
58
+ }, {
59
+ include: "doc-syntax"
60
+ }, {
61
+ defaultToken: "text.doc"
62
+ }
63
+ ]
64
+ }, {
65
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
66
+ regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
67
+ + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
68
+ + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
69
+ + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
70
+ }, {
71
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
72
+ regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
73
+ }, {
74
+ token: "comment.doc.tag",
75
+ regex: "@access\\s+(?:private|public|protected)"
76
+ }, {
77
+ token: "comment.doc.tag",
78
+ regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
79
+ }, {
80
+ token: "comment.doc.tag",
81
+ regex: "@\\w+(?=\\s|$)"
82
+ },
83
+ JsDocCommentHighlightRules.getTagRule(),
84
+ {
85
+ defaultToken: "comment.doc",
86
+ caseInsensitive: true
87
+ }
88
+ ],
89
+ "doc-syntax": [{
90
+ token: "operator.doc",
91
+ regex: /[|:]/
92
+ }, {
93
+ token: "paren.doc",
94
+ regex: /[\[\]]/
95
+ }]
18
96
  };
97
+ this.normalizeRules();
19
98
  };
20
-
21
- oop.inherits(DocCommentHighlightRules, TextHighlightRules);
22
-
23
- DocCommentHighlightRules.getTagRule = function(start) {
99
+ oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
100
+ JsDocCommentHighlightRules.getTagRule = function (start) {
24
101
  return {
25
- token : "comment.doc.tag.storage.type",
26
- regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
102
+ token: "comment.doc.tag.storage.type",
103
+ regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
27
104
  };
28
105
  };
29
-
30
- DocCommentHighlightRules.getStartRule = function(start) {
106
+ JsDocCommentHighlightRules.getStartRule = function (start) {
31
107
  return {
32
- token : "comment.doc", // doc comment
33
- regex : "\\/\\*(?=\\*)",
34
- next : start
108
+ token: "comment.doc",
109
+ regex: "\\/\\*(?=\\*)",
110
+ next: start
35
111
  };
36
112
  };
37
-
38
- DocCommentHighlightRules.getEndRule = function (start) {
113
+ JsDocCommentHighlightRules.getEndRule = function (start) {
39
114
  return {
40
- token : "comment.doc", // closing comment
41
- regex : "\\*\\/",
42
- next : start
115
+ token: "comment.doc",
116
+ regex: "\\*\\/",
117
+ next: start
43
118
  };
44
119
  };
45
-
46
-
47
- exports.DocCommentHighlightRules = DocCommentHighlightRules;
120
+ exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
48
121
 
49
122
  });
50
123
 
51
- ace.define("ace/mode/javascript_highlight_rules",[], function(require, exports, module) {
52
- "use strict";
53
-
124
+ ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
54
125
  var oop = require("../lib/oop");
55
- var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
126
+ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
56
127
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
57
128
  var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
58
-
59
- var JavaScriptHighlightRules = function(options) {
129
+ var JavaScriptHighlightRules = function (options) {
60
130
  var keywordMapper = this.createKeywordMapper({
61
- "variable.language":
62
- "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
63
- "Namespace|QName|XML|XMLList|" + // E4X
64
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
65
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
66
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
67
- "SyntaxError|TypeError|URIError|" +
131
+ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
132
+ "Namespace|QName|XML|XMLList|" + // E4X
133
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
134
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
135
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
136
+ "SyntaxError|TypeError|URIError|" +
68
137
  "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
69
- "isNaN|parseFloat|parseInt|" +
70
- "JSON|Math|" + // Other
71
- "this|arguments|prototype|window|document" , // Pseudo
72
- "keyword":
73
- "const|yield|import|get|set|async|await|" +
138
+ "isNaN|parseFloat|parseInt|" +
139
+ "JSON|Math|" + // Other
140
+ "this|arguments|prototype|window|document",
141
+ "keyword": "const|yield|import|get|set|async|await|" +
74
142
  "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
75
143
  "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
76
144
  "__parent__|__count__|escape|unescape|with|__proto__|" +
77
- "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
78
- "storage.type":
79
- "const|let|var|function",
80
- "constant.language":
81
- "null|Infinity|NaN|undefined",
82
- "support.function":
83
- "alert",
145
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
146
+ "storage.type": "const|let|var|function",
147
+ "constant.language": "null|Infinity|NaN|undefined",
148
+ "support.function": "alert",
84
149
  "constant.language.boolean": "true|false"
85
150
  }, "identifier");
86
151
  var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
87
-
88
152
  var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
89
153
  "u[0-9a-fA-F]{4}|" + // unicode
90
154
  "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
@@ -92,143 +156,142 @@ var JavaScriptHighlightRules = function(options) {
92
156
  "3[0-7][0-7]?|" + // oct
93
157
  "[4-7][0-7]?|" + //oct
94
158
  ".)";
95
-
96
159
  this.$rules = {
97
- "no_regex" : [
160
+ "no_regex": [
98
161
  DocCommentHighlightRules.getStartRule("doc-start"),
99
162
  comments("no_regex"),
100
163
  {
101
- token : "string",
102
- regex : "'(?=.)",
103
- next : "qstring"
164
+ token: "string",
165
+ regex: "'(?=.)",
166
+ next: "qstring"
104
167
  }, {
105
- token : "string",
106
- regex : '"(?=.)',
107
- next : "qqstring"
168
+ token: "string",
169
+ regex: '"(?=.)',
170
+ next: "qqstring"
108
171
  }, {
109
- token : "constant.numeric", // hexadecimal, octal and binary
110
- regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
172
+ token: "constant.numeric",
173
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
111
174
  }, {
112
- token : "constant.numeric", // decimal integers and floats
113
- regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
175
+ token: "constant.numeric",
176
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
114
177
  }, {
115
- token : [
178
+ token: [
116
179
  "storage.type", "punctuation.operator", "support.function",
117
- "punctuation.operator", "entity.name.function", "text","keyword.operator"
180
+ "punctuation.operator", "entity.name.function", "text", "keyword.operator"
118
181
  ],
119
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
182
+ regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
120
183
  next: "function_arguments"
121
184
  }, {
122
- token : [
185
+ token: [
123
186
  "storage.type", "punctuation.operator", "entity.name.function", "text",
124
187
  "keyword.operator", "text", "storage.type", "text", "paren.lparen"
125
188
  ],
126
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
189
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
127
190
  next: "function_arguments"
128
191
  }, {
129
- token : [
192
+ token: [
130
193
  "entity.name.function", "text", "keyword.operator", "text", "storage.type",
131
194
  "text", "paren.lparen"
132
195
  ],
133
- regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
196
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
134
197
  next: "function_arguments"
135
198
  }, {
136
- token : [
199
+ token: [
137
200
  "storage.type", "punctuation.operator", "entity.name.function", "text",
138
201
  "keyword.operator", "text",
139
202
  "storage.type", "text", "entity.name.function", "text", "paren.lparen"
140
203
  ],
141
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
204
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
142
205
  next: "function_arguments"
143
206
  }, {
144
- token : [
207
+ token: [
145
208
  "storage.type", "text", "entity.name.function", "text", "paren.lparen"
146
209
  ],
147
- regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
210
+ regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
148
211
  next: "function_arguments"
149
212
  }, {
150
- token : [
213
+ token: [
151
214
  "entity.name.function", "text", "punctuation.operator",
152
215
  "text", "storage.type", "text", "paren.lparen"
153
216
  ],
154
- regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
217
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
155
218
  next: "function_arguments"
156
219
  }, {
157
- token : [
220
+ token: [
158
221
  "text", "text", "storage.type", "text", "paren.lparen"
159
222
  ],
160
- regex : "(:)(\\s*)(function)(\\s*)(\\()",
223
+ regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
161
224
  next: "function_arguments"
162
225
  }, {
163
- token : "keyword",
164
- regex : "from(?=\\s*('|\"))"
226
+ token: "keyword",
227
+ regex: "from(?=\\s*('|\"))"
165
228
  }, {
166
- token : "keyword",
167
- regex : "(?:" + kwBeforeRe + ")\\b",
168
- next : "start"
229
+ token: "keyword",
230
+ regex: "(?:" + kwBeforeRe + ")\\b",
231
+ next: "start"
169
232
  }, {
170
- token : ["support.constant"],
171
- regex : /that\b/
233
+ token: "support.constant",
234
+ regex: /that\b/
172
235
  }, {
173
- token : ["storage.type", "punctuation.operator", "support.function.firebug"],
174
- regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
236
+ token: ["storage.type", "punctuation.operator", "support.function.firebug"],
237
+ regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
175
238
  }, {
176
- token : keywordMapper,
177
- regex : identifierRe
239
+ token: keywordMapper,
240
+ regex: identifierRe
178
241
  }, {
179
- token : "punctuation.operator",
180
- regex : /[.](?![.])/,
181
- next : "property"
242
+ token: "punctuation.operator",
243
+ regex: /[.](?![.])/,
244
+ next: "property"
182
245
  }, {
183
- token : "storage.type",
184
- regex : /=>/,
185
- next : "start"
246
+ token: "storage.type",
247
+ regex: /=>/,
248
+ next: "start"
186
249
  }, {
187
- token : "keyword.operator",
188
- regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
189
- next : "start"
250
+ token: "keyword.operator",
251
+ regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
252
+ next: "start"
190
253
  }, {
191
- token : "punctuation.operator",
192
- regex : /[?:,;.]/,
193
- next : "start"
254
+ token: "punctuation.operator",
255
+ regex: /[?:,;.]/,
256
+ next: "start"
194
257
  }, {
195
- token : "paren.lparen",
196
- regex : /[\[({]/,
197
- next : "start"
258
+ token: "paren.lparen",
259
+ regex: /[\[({]/,
260
+ next: "start"
198
261
  }, {
199
- token : "paren.rparen",
200
- regex : /[\])}]/
262
+ token: "paren.rparen",
263
+ regex: /[\])}]/
201
264
  }, {
202
265
  token: "comment",
203
266
  regex: /^#!.*$/
204
267
  }
205
268
  ],
206
269
  property: [{
207
- token : "text",
208
- regex : "\\s+"
270
+ token: "text",
271
+ regex: "\\s+"
209
272
  }, {
210
- token : [
273
+ token: [
211
274
  "storage.type", "punctuation.operator", "entity.name.function", "text",
212
275
  "keyword.operator", "text",
213
276
  "storage.type", "text", "entity.name.function", "text", "paren.lparen"
214
277
  ],
215
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
278
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
216
279
  next: "function_arguments"
217
280
  }, {
218
- token : "punctuation.operator",
219
- regex : /[.](?![.])/
281
+ token: "punctuation.operator",
282
+ regex: /[.](?![.])/
220
283
  }, {
221
- token : "support.function",
222
- regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
284
+ token: "support.function",
285
+ regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
223
286
  }, {
224
- token : "support.function.dom",
225
- regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
287
+ token: "support.function.dom",
288
+ regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
226
289
  }, {
227
- token : "support.constant",
228
- regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
290
+ token: "support.constant",
291
+ regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
229
292
  }, {
230
- token : "identifier",
231
- regex : identifierRe
293
+ token: "identifier",
294
+ regex: identifierRe
232
295
  }, {
233
296
  regex: "",
234
297
  token: "empty",
@@ -243,9 +306,9 @@ var JavaScriptHighlightRules = function(options) {
243
306
  regex: "\\/",
244
307
  next: "regex"
245
308
  }, {
246
- token : "text",
247
- regex : "\\s+|^$",
248
- next : "start"
309
+ token: "text",
310
+ regex: "\\s+|^$",
311
+ next: "start"
249
312
  }, {
250
313
  token: "empty",
251
314
  regex: "",
@@ -261,13 +324,13 @@ var JavaScriptHighlightRules = function(options) {
261
324
  regex: "/[sxngimy]*",
262
325
  next: "no_regex"
263
326
  }, {
264
- token : "invalid",
327
+ token: "invalid",
265
328
  regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
266
329
  }, {
267
- token : "constant.language.escape",
330
+ token: "constant.language.escape",
268
331
  regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
269
332
  }, {
270
- token : "constant.language.delimiter",
333
+ token: "constant.language.delimiter",
271
334
  regex: /\|/
272
335
  }, {
273
336
  token: "constant.language.escape",
@@ -300,13 +363,67 @@ var JavaScriptHighlightRules = function(options) {
300
363
  defaultToken: "string.regexp.charachterclass"
301
364
  }
302
365
  ],
366
+ "default_parameter": [
367
+ {
368
+ token: "string",
369
+ regex: "'(?=.)",
370
+ push: [
371
+ {
372
+ token: "string",
373
+ regex: "'|$",
374
+ next: "pop"
375
+ }, {
376
+ include: "qstring"
377
+ }
378
+ ]
379
+ }, {
380
+ token: "string",
381
+ regex: '"(?=.)',
382
+ push: [
383
+ {
384
+ token: "string",
385
+ regex: '"|$',
386
+ next: "pop"
387
+ }, {
388
+ include: "qqstring"
389
+ }
390
+ ]
391
+ }, {
392
+ token: "constant.language",
393
+ regex: "null|Infinity|NaN|undefined"
394
+ }, {
395
+ token: "constant.numeric",
396
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
397
+ }, {
398
+ token: "constant.numeric",
399
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
400
+ }, {
401
+ token: "punctuation.operator",
402
+ regex: ",",
403
+ next: "function_arguments"
404
+ }, {
405
+ token: "text",
406
+ regex: "\\s+"
407
+ }, {
408
+ token: "punctuation.operator",
409
+ regex: "$"
410
+ }, {
411
+ token: "empty",
412
+ regex: "",
413
+ next: "no_regex"
414
+ }
415
+ ],
303
416
  "function_arguments": [
417
+ comments("function_arguments"),
304
418
  {
305
419
  token: "variable.parameter",
306
420
  regex: identifierRe
307
421
  }, {
308
422
  token: "punctuation.operator",
309
- regex: "[, ]+"
423
+ regex: ","
424
+ }, {
425
+ token: "text",
426
+ regex: "\\s+"
310
427
  }, {
311
428
  token: "punctuation.operator",
312
429
  regex: "$"
@@ -316,44 +433,42 @@ var JavaScriptHighlightRules = function(options) {
316
433
  next: "no_regex"
317
434
  }
318
435
  ],
319
- "qqstring" : [
436
+ "qqstring": [
320
437
  {
321
- token : "constant.language.escape",
322
- regex : escapedRe
438
+ token: "constant.language.escape",
439
+ regex: escapedRe
323
440
  }, {
324
- token : "string",
325
- regex : "\\\\$",
326
- consumeLineEnd : true
441
+ token: "string",
442
+ regex: "\\\\$",
443
+ consumeLineEnd: true
327
444
  }, {
328
- token : "string",
329
- regex : '"|$',
330
- next : "no_regex"
445
+ token: "string",
446
+ regex: '"|$',
447
+ next: "no_regex"
331
448
  }, {
332
449
  defaultToken: "string"
333
450
  }
334
451
  ],
335
- "qstring" : [
452
+ "qstring": [
336
453
  {
337
- token : "constant.language.escape",
338
- regex : escapedRe
454
+ token: "constant.language.escape",
455
+ regex: escapedRe
339
456
  }, {
340
- token : "string",
341
- regex : "\\\\$",
342
- consumeLineEnd : true
457
+ token: "string",
458
+ regex: "\\\\$",
459
+ consumeLineEnd: true
343
460
  }, {
344
- token : "string",
345
- regex : "'|$",
346
- next : "no_regex"
461
+ token: "string",
462
+ regex: "'|$",
463
+ next: "no_regex"
347
464
  }, {
348
465
  defaultToken: "string"
349
466
  }
350
467
  ]
351
468
  };
352
-
353
-
354
469
  if (!options || !options.noES6) {
355
470
  this.$rules.no_regex.unshift({
356
- regex: "[{}]", onMatch: function(val, state, stack) {
471
+ regex: "[{}]", onMatch: function (val, state, stack) {
357
472
  this.next = val == "{" ? this.nextState : "";
358
473
  if (val == "{" && stack.length) {
359
474
  stack.unshift("start", state);
@@ -368,40 +483,60 @@ var JavaScriptHighlightRules = function(options) {
368
483
  },
369
484
  nextState: "start"
370
485
  }, {
371
- token : "string.quasi.start",
372
- regex : /`/,
373
- push : [{
374
- token : "constant.language.escape",
375
- regex : escapedRe
376
- }, {
377
- token : "paren.quasi.start",
378
- regex : /\${/,
379
- push : "start"
380
- }, {
381
- token : "string.quasi.end",
382
- regex : /`/,
383
- next : "pop"
384
- }, {
385
- defaultToken: "string.quasi"
386
- }]
486
+ token: "string.quasi.start",
487
+ regex: /`/,
488
+ push: [{
489
+ token: "constant.language.escape",
490
+ regex: escapedRe
491
+ }, {
492
+ token: "paren.quasi.start",
493
+ regex: /\${/,
494
+ push: "start"
495
+ }, {
496
+ token: "string.quasi.end",
497
+ regex: /`/,
498
+ next: "pop"
499
+ }, {
500
+ defaultToken: "string.quasi"
501
+ }]
502
+ }, {
503
+ token: ["variable.parameter", "text"],
504
+ regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
505
+ }, {
506
+ token: "paren.lparen",
507
+ regex: "(\\()(?=.+\\s*=>)",
508
+ next: "function_arguments"
509
+ }, {
510
+ token: "variable.language",
511
+ regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
512
+ });
513
+ this.$rules["function_arguments"].unshift({
514
+ token: "keyword.operator",
515
+ regex: "=",
516
+ next: "default_parameter"
517
+ }, {
518
+ token: "keyword.operator",
519
+ regex: "\\.{3}"
520
+ });
521
+ this.$rules["property"].unshift({
522
+ token: "support.function",
523
+ regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
524
+ + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
525
+ }, {
526
+ token: "constant.language",
527
+ regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
387
528
  });
388
-
389
529
  if (!options || options.jsx != false)
390
530
  JSX.call(this);
391
531
  }
392
-
393
- this.embedRules(DocCommentHighlightRules, "doc-",
394
- [ DocCommentHighlightRules.getEndRule("no_regex") ]);
395
-
532
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
396
533
  this.normalizeRules();
397
534
  };
398
-
399
535
  oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
400
-
401
536
  function JSX() {
402
537
  var tagRegex = identifierRe.replace("\\d", "\\d\\-");
403
538
  var jsxTag = {
404
- onMatch : function(val, state, stack) {
539
+ onMatch: function (val, state, stack) {
405
540
  var offset = val.charAt(1) == "/" ? 2 : 1;
406
541
  if (offset == 1) {
407
542
  if (state != this.nextState)
@@ -409,7 +544,8 @@ function JSX() {
409
544
  else
410
545
  stack.unshift(this.next);
411
546
  stack[2]++;
412
- } else if (offset == 2) {
547
+ }
548
+ else if (offset == 2) {
413
549
  if (state == this.nextState) {
414
550
  stack[1]--;
415
551
  if (!stack[1] || stack[1] < 0) {
@@ -419,14 +555,14 @@ function JSX() {
419
555
  }
420
556
  }
421
557
  return [{
422
- type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
423
- value: val.slice(0, offset)
424
- }, {
425
- type: "meta.tag.tag-name.xml",
426
- value: val.substr(offset)
427
- }];
558
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
559
+ value: val.slice(0, offset)
560
+ }, {
561
+ type: "meta.tag.tag-name.xml",
562
+ value: val.substr(offset)
563
+ }];
428
564
  },
429
- regex : "</?" + tagRegex + "",
565
+ regex: "</?" + tagRegex + "",
430
566
  next: "jsxAttributes",
431
567
  nextState: "jsx"
432
568
  };
@@ -439,212 +575,177 @@ function JSX() {
439
575
  this.$rules.jsx = [
440
576
  jsxJsRule,
441
577
  jsxTag,
442
- {include : "reference"},
443
- {defaultToken: "string"}
578
+ { include: "reference" },
579
+ { defaultToken: "string" }
444
580
  ];
445
581
  this.$rules.jsxAttributes = [{
446
- token : "meta.tag.punctuation.tag-close.xml",
447
- regex : "/?>",
448
- onMatch : function(value, currentState, stack) {
449
- if (currentState == stack[0])
450
- stack.shift();
451
- if (value.length == 2) {
452
- if (stack[0] == this.nextState)
453
- stack[1]--;
454
- if (!stack[1] || stack[1] < 0) {
455
- stack.splice(0, 2);
582
+ token: "meta.tag.punctuation.tag-close.xml",
583
+ regex: "/?>",
584
+ onMatch: function (value, currentState, stack) {
585
+ if (currentState == stack[0])
586
+ stack.shift();
587
+ if (value.length == 2) {
588
+ if (stack[0] == this.nextState)
589
+ stack[1]--;
590
+ if (!stack[1] || stack[1] < 0) {
591
+ stack.splice(0, 2);
592
+ }
456
593
  }
457
- }
458
- this.next = stack[0] || "start";
459
- return [{type: this.token, value: value}];
594
+ this.next = stack[0] || "start";
595
+ return [{ type: this.token, value: value }];
596
+ },
597
+ nextState: "jsx"
460
598
  },
461
- nextState: "jsx"
462
- },
463
- jsxJsRule,
464
- comments("jsxAttributes"),
465
- {
466
- token : "entity.other.attribute-name.xml",
467
- regex : tagRegex
468
- }, {
469
- token : "keyword.operator.attribute-equals.xml",
470
- regex : "="
471
- }, {
472
- token : "text.tag-whitespace.xml",
473
- regex : "\\s+"
474
- }, {
475
- token : "string.attribute-value.xml",
476
- regex : "'",
477
- stateName : "jsx_attr_q",
478
- push : [
479
- {token : "string.attribute-value.xml", regex: "'", next: "pop"},
480
- {include : "reference"},
481
- {defaultToken : "string.attribute-value.xml"}
482
- ]
483
- }, {
484
- token : "string.attribute-value.xml",
485
- regex : '"',
486
- stateName : "jsx_attr_qq",
487
- push : [
488
- {token : "string.attribute-value.xml", regex: '"', next: "pop"},
489
- {include : "reference"},
490
- {defaultToken : "string.attribute-value.xml"}
491
- ]
492
- },
493
- jsxTag
599
+ jsxJsRule,
600
+ comments("jsxAttributes"),
601
+ {
602
+ token: "entity.other.attribute-name.xml",
603
+ regex: tagRegex
604
+ }, {
605
+ token: "keyword.operator.attribute-equals.xml",
606
+ regex: "="
607
+ }, {
608
+ token: "text.tag-whitespace.xml",
609
+ regex: "\\s+"
610
+ }, {
611
+ token: "string.attribute-value.xml",
612
+ regex: "'",
613
+ stateName: "jsx_attr_q",
614
+ push: [
615
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
616
+ { include: "reference" },
617
+ { defaultToken: "string.attribute-value.xml" }
618
+ ]
619
+ }, {
620
+ token: "string.attribute-value.xml",
621
+ regex: '"',
622
+ stateName: "jsx_attr_qq",
623
+ push: [
624
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
625
+ { include: "reference" },
626
+ { defaultToken: "string.attribute-value.xml" }
627
+ ]
628
+ },
629
+ jsxTag
494
630
  ];
495
631
  this.$rules.reference = [{
496
- token : "constant.language.escape.reference.xml",
497
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
498
- }];
632
+ token: "constant.language.escape.reference.xml",
633
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
634
+ }];
499
635
  }
500
-
501
636
  function comments(next) {
502
637
  return [
503
638
  {
504
- token : "comment", // multi line comment
505
- regex : /\/\*/,
639
+ token: "comment",
640
+ regex: /\/\*/,
506
641
  next: [
507
642
  DocCommentHighlightRules.getTagRule(),
508
- {token : "comment", regex : "\\*\\/", next : next || "pop"},
509
- {defaultToken : "comment", caseInsensitive: true}
643
+ { token: "comment", regex: "\\*\\/", next: next || "pop" },
644
+ { defaultToken: "comment", caseInsensitive: true }
510
645
  ]
511
646
  }, {
512
- token : "comment",
513
- regex : "\\/\\/",
647
+ token: "comment",
648
+ regex: "\\/\\/",
514
649
  next: [
515
650
  DocCommentHighlightRules.getTagRule(),
516
- {token : "comment", regex : "$|^", next : next || "pop"},
517
- {defaultToken : "comment", caseInsensitive: true}
651
+ { token: "comment", regex: "$|^", next: next || "pop" },
652
+ { defaultToken: "comment", caseInsensitive: true }
518
653
  ]
519
654
  }
520
655
  ];
521
656
  }
522
657
  exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
523
- });
524
658
 
525
- ace.define("ace/mode/matching_brace_outdent",[], function(require, exports, module) {
526
- "use strict";
659
+ });
527
660
 
661
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
528
662
  var Range = require("../range").Range;
529
-
530
- var MatchingBraceOutdent = function() {};
531
-
532
- (function() {
533
-
534
- this.checkOutdent = function(line, input) {
535
- if (! /^\s+$/.test(line))
663
+ var MatchingBraceOutdent = function () { };
664
+ (function () {
665
+ this.checkOutdent = function (line, input) {
666
+ if (!/^\s+$/.test(line))
536
667
  return false;
537
-
538
668
  return /^\s*\}/.test(input);
539
669
  };
540
-
541
- this.autoOutdent = function(doc, row) {
670
+ this.autoOutdent = function (doc, row) {
542
671
  var line = doc.getLine(row);
543
672
  var match = line.match(/^(\s*\})/);
544
-
545
- if (!match) return 0;
546
-
673
+ if (!match)
674
+ return 0;
547
675
  var column = match[1].length;
548
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
549
-
550
- if (!openBracePos || openBracePos.row == row) return 0;
551
-
676
+ var openBracePos = doc.findMatchingBracket({ row: row, column: column });
677
+ if (!openBracePos || openBracePos.row == row)
678
+ return 0;
552
679
  var indent = this.$getIndent(doc.getLine(openBracePos.row));
553
- doc.replace(new Range(row, 0, row, column-1), indent);
680
+ doc.replace(new Range(row, 0, row, column - 1), indent);
554
681
  };
555
-
556
- this.$getIndent = function(line) {
682
+ this.$getIndent = function (line) {
557
683
  return line.match(/^\s*/)[0];
558
684
  };
559
-
560
685
  }).call(MatchingBraceOutdent.prototype);
561
-
562
686
  exports.MatchingBraceOutdent = MatchingBraceOutdent;
563
- });
564
687
 
565
- ace.define("ace/mode/folding/cstyle",[], function(require, exports, module) {
566
- "use strict";
688
+ });
567
689
 
690
+ ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
568
691
  var oop = require("../../lib/oop");
569
692
  var Range = require("../../range").Range;
570
693
  var BaseFoldMode = require("./fold_mode").FoldMode;
571
-
572
- var FoldMode = exports.FoldMode = function(commentRegex) {
694
+ var FoldMode = exports.FoldMode = function (commentRegex) {
573
695
  if (commentRegex) {
574
- this.foldingStartMarker = new RegExp(
575
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
576
- );
577
- this.foldingStopMarker = new RegExp(
578
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
579
- );
696
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
697
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
580
698
  }
581
699
  };
582
700
  oop.inherits(FoldMode, BaseFoldMode);
583
-
584
- (function() {
585
-
701
+ (function () {
586
702
  this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
587
703
  this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
588
- this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
704
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
589
705
  this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
590
706
  this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
591
707
  this._getFoldWidgetBase = this.getFoldWidget;
592
- this.getFoldWidget = function(session, foldStyle, row) {
708
+ this.getFoldWidget = function (session, foldStyle, row) {
593
709
  var line = session.getLine(row);
594
-
595
710
  if (this.singleLineBlockCommentRe.test(line)) {
596
711
  if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
597
712
  return "";
598
713
  }
599
-
600
714
  var fw = this._getFoldWidgetBase(session, foldStyle, row);
601
-
602
715
  if (!fw && this.startRegionRe.test(line))
603
716
  return "start"; // lineCommentRegionStart
604
-
605
717
  return fw;
606
718
  };
607
-
608
- this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
719
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
609
720
  var line = session.getLine(row);
610
-
611
721
  if (this.startRegionRe.test(line))
612
722
  return this.getCommentRegionBlock(session, line, row);
613
-
614
723
  var match = line.match(this.foldingStartMarker);
615
724
  if (match) {
616
725
  var i = match.index;
617
-
618
726
  if (match[1])
619
727
  return this.openingBracketBlock(session, match[1], row, i);
620
-
621
728
  var range = session.getCommentFoldRange(row, i + match[0].length, 1);
622
-
623
729
  if (range && !range.isMultiLine()) {
624
730
  if (forceMultiline) {
625
731
  range = this.getSectionRange(session, row);
626
- } else if (foldStyle != "all")
732
+ }
733
+ else if (foldStyle != "all")
627
734
  range = null;
628
735
  }
629
-
630
736
  return range;
631
737
  }
632
-
633
738
  if (foldStyle === "markbegin")
634
739
  return;
635
-
636
740
  var match = line.match(this.foldingStopMarker);
637
741
  if (match) {
638
742
  var i = match.index + match[0].length;
639
-
640
743
  if (match[1])
641
744
  return this.closingBracketBlock(session, match[1], row, i);
642
-
643
745
  return session.getCommentFoldRange(row, i, -1);
644
746
  }
645
747
  };
646
-
647
- this.getSectionRange = function(session, row) {
748
+ this.getSectionRange = function (session, row) {
648
749
  var line = session.getLine(row);
649
750
  var startIndent = line.search(/\S/);
650
751
  var startRow = row;
@@ -657,54 +758,52 @@ oop.inherits(FoldMode, BaseFoldMode);
657
758
  var indent = line.search(/\S/);
658
759
  if (indent === -1)
659
760
  continue;
660
- if (startIndent > indent)
761
+ if (startIndent > indent)
661
762
  break;
662
763
  var subRange = this.getFoldWidgetRange(session, "all", row);
663
-
664
764
  if (subRange) {
665
765
  if (subRange.start.row <= startRow) {
666
766
  break;
667
- } else if (subRange.isMultiLine()) {
767
+ }
768
+ else if (subRange.isMultiLine()) {
668
769
  row = subRange.end.row;
669
- } else if (startIndent == indent) {
770
+ }
771
+ else if (startIndent == indent) {
670
772
  break;
671
773
  }
672
774
  }
673
775
  endRow = row;
674
776
  }
675
-
676
777
  return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
677
778
  };
678
- this.getCommentRegionBlock = function(session, line, row) {
779
+ this.getCommentRegionBlock = function (session, line, row) {
679
780
  var startColumn = line.search(/\s*$/);
680
781
  var maxRow = session.getLength();
681
782
  var startRow = row;
682
-
683
783
  var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
684
784
  var depth = 1;
685
785
  while (++row < maxRow) {
686
786
  line = session.getLine(row);
687
787
  var m = re.exec(line);
688
- if (!m) continue;
689
- if (m[1]) depth--;
690
- else depth++;
691
-
692
- if (!depth) break;
788
+ if (!m)
789
+ continue;
790
+ if (m[1])
791
+ depth--;
792
+ else
793
+ depth++;
794
+ if (!depth)
795
+ break;
693
796
  }
694
-
695
797
  var endRow = row;
696
798
  if (endRow > startRow) {
697
799
  return new Range(startRow, startColumn, endRow, line.length);
698
800
  }
699
801
  };
700
-
701
802
  }).call(FoldMode.prototype);
702
803
 
703
804
  });
704
805
 
705
- ace.define("ace/mode/javascript",[], function(require, exports, module) {
706
- "use strict";
707
-
806
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
708
807
  var oop = require("../lib/oop");
709
808
  var TextMode = require("./text").Mode;
710
809
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
@@ -712,39 +811,35 @@ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutd
712
811
  var WorkerClient = require("../worker/worker_client").WorkerClient;
713
812
  var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
714
813
  var CStyleFoldMode = require("./folding/cstyle").FoldMode;
715
-
716
- var Mode = function() {
814
+ var Mode = function () {
717
815
  this.HighlightRules = JavaScriptHighlightRules;
718
-
719
816
  this.$outdent = new MatchingBraceOutdent();
720
817
  this.$behaviour = new CstyleBehaviour();
721
818
  this.foldingRules = new CStyleFoldMode();
722
819
  };
723
820
  oop.inherits(Mode, TextMode);
724
-
725
- (function() {
726
-
821
+ (function () {
727
822
  this.lineCommentStart = "//";
728
- this.blockComment = {start: "/*", end: "*/"};
729
- this.$quotes = {'"': '"', "'": "'", "`": "`"};
730
-
731
- this.getNextLineIndent = function(state, line, tab) {
823
+ this.blockComment = { start: "/*", end: "*/" };
824
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
825
+ this.$pairQuotesAfter = {
826
+ "`": /\w/
827
+ };
828
+ this.getNextLineIndent = function (state, line, tab) {
732
829
  var indent = this.$getIndent(line);
733
-
734
830
  var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
735
831
  var tokens = tokenizedLine.tokens;
736
832
  var endState = tokenizedLine.state;
737
-
738
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
833
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
739
834
  return indent;
740
835
  }
741
-
742
836
  if (state == "start" || state == "no_regex") {
743
837
  var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
744
838
  if (match) {
745
839
  indent += tab;
746
840
  }
747
- } else if (state == "doc-start") {
841
+ }
842
+ else if (state == "doc-start") {
748
843
  if (endState == "start" || endState == "no_regex") {
749
844
  return "";
750
845
  }
@@ -756,58 +851,45 @@ oop.inherits(Mode, TextMode);
756
851
  indent += "* ";
757
852
  }
758
853
  }
759
-
760
854
  return indent;
761
855
  };
762
-
763
- this.checkOutdent = function(state, line, input) {
856
+ this.checkOutdent = function (state, line, input) {
764
857
  return this.$outdent.checkOutdent(line, input);
765
858
  };
766
-
767
- this.autoOutdent = function(state, doc, row) {
859
+ this.autoOutdent = function (state, doc, row) {
768
860
  this.$outdent.autoOutdent(doc, row);
769
861
  };
770
-
771
- this.createWorker = function(session) {
862
+ this.createWorker = function (session) {
772
863
  var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
773
864
  worker.attachToDocument(session.getDocument());
774
-
775
- worker.on("annotate", function(results) {
865
+ worker.on("annotate", function (results) {
776
866
  session.setAnnotations(results.data);
777
867
  });
778
-
779
- worker.on("terminate", function() {
868
+ worker.on("terminate", function () {
780
869
  session.clearAnnotations();
781
870
  });
782
-
783
871
  return worker;
784
872
  };
785
-
786
873
  this.$id = "ace/mode/javascript";
787
874
  this.snippetFileId = "ace/snippets/javascript";
788
875
  }).call(Mode.prototype);
789
-
790
876
  exports.Mode = Mode;
791
- });
792
877
 
793
- ace.define("ace/mode/css_highlight_rules",[], function(require, exports, module) {
794
- "use strict";
878
+ });
795
879
 
880
+ ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
796
881
  var oop = require("../lib/oop");
797
882
  var lang = require("../lib/lang");
798
883
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
799
884
  var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
800
885
  var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
801
- var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
886
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
802
887
  var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
803
888
  var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
804
-
805
889
  var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
806
890
  var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
807
- var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
808
-
809
- var CssHighlightRules = function() {
810
-
891
+ var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
892
+ var CssHighlightRules = function () {
811
893
  var keywordMapper = this.createKeywordMapper({
812
894
  "support.function": supportFunction,
813
895
  "support.constant": supportConstant,
@@ -815,245 +897,232 @@ var CssHighlightRules = function() {
815
897
  "support.constant.color": supportConstantColor,
816
898
  "support.constant.fonts": supportConstantFonts
817
899
  }, "text", true);
818
-
819
900
  this.$rules = {
820
- "start" : [{
821
- include : ["strings", "url", "comments"]
822
- }, {
823
- token: "paren.lparen",
824
- regex: "\\{",
825
- next: "ruleset"
826
- }, {
827
- token: "paren.rparen",
828
- regex: "\\}"
829
- }, {
830
- token: "string",
831
- regex: "@(?!viewport)",
832
- next: "media"
833
- }, {
834
- token: "keyword",
835
- regex: "#[a-z0-9-_]+"
836
- }, {
837
- token: "keyword",
838
- regex: "%"
839
- }, {
840
- token: "variable",
841
- regex: "\\.[a-z0-9-_]+"
842
- }, {
843
- token: "string",
844
- regex: ":[a-z0-9-_]+"
845
- }, {
846
- token : "constant.numeric",
847
- regex : numRe
848
- }, {
849
- token: "constant",
850
- regex: "[a-z0-9-_]+"
851
- }, {
852
- caseInsensitive: true
853
- }],
854
-
901
+ "start": [{
902
+ include: ["strings", "url", "comments"]
903
+ }, {
904
+ token: "paren.lparen",
905
+ regex: "\\{",
906
+ next: "ruleset"
907
+ }, {
908
+ token: "paren.rparen",
909
+ regex: "\\}"
910
+ }, {
911
+ token: "string",
912
+ regex: "@(?!viewport)",
913
+ next: "media"
914
+ }, {
915
+ token: "keyword",
916
+ regex: "#[a-z0-9-_]+"
917
+ }, {
918
+ token: "keyword",
919
+ regex: "%"
920
+ }, {
921
+ token: "variable",
922
+ regex: "\\.[a-z0-9-_]+"
923
+ }, {
924
+ token: "string",
925
+ regex: ":[a-z0-9-_]+"
926
+ }, {
927
+ token: "constant.numeric",
928
+ regex: numRe
929
+ }, {
930
+ token: "constant",
931
+ regex: "[a-z0-9-_]+"
932
+ }, {
933
+ caseInsensitive: true
934
+ }],
855
935
  "media": [{
856
- include : ["strings", "url", "comments"]
857
- }, {
858
- token: "paren.lparen",
859
- regex: "\\{",
860
- next: "start"
861
- }, {
862
- token: "paren.rparen",
863
- regex: "\\}",
864
- next: "start"
865
- }, {
866
- token: "string",
867
- regex: ";",
868
- next: "start"
869
- }, {
870
- token: "keyword",
871
- regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
872
- + "|page|font|keyframes|viewport|counter-style|font-feature-values"
873
- + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
874
- }],
875
-
876
- "comments" : [{
877
- token: "comment", // multi line comment
878
- regex: "\\/\\*",
879
- push: [{
880
- token : "comment",
881
- regex : "\\*\\/",
882
- next : "pop"
936
+ include: ["strings", "url", "comments"]
937
+ }, {
938
+ token: "paren.lparen",
939
+ regex: "\\{",
940
+ next: "start"
941
+ }, {
942
+ token: "paren.rparen",
943
+ regex: "\\}",
944
+ next: "start"
945
+ }, {
946
+ token: "string",
947
+ regex: ";",
948
+ next: "start"
949
+ }, {
950
+ token: "keyword",
951
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
952
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
953
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
954
+ }],
955
+ "comments": [{
956
+ token: "comment",
957
+ regex: "\\/\\*",
958
+ push: [{
959
+ token: "comment",
960
+ regex: "\\*\\/",
961
+ next: "pop"
962
+ }, {
963
+ defaultToken: "comment"
964
+ }]
965
+ }],
966
+ "ruleset": [{
967
+ regex: "-(webkit|ms|moz|o)-",
968
+ token: "text"
883
969
  }, {
884
- defaultToken : "comment"
885
- }]
886
- }],
887
-
888
- "ruleset" : [{
889
- regex : "-(webkit|ms|moz|o)-",
890
- token : "text"
891
- }, {
892
- token : "punctuation.operator",
893
- regex : "[:;]"
894
- }, {
895
- token : "paren.rparen",
896
- regex : "\\}",
897
- next : "start"
898
- }, {
899
- include : ["strings", "url", "comments"]
900
- }, {
901
- token : ["constant.numeric", "keyword"],
902
- regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
903
- }, {
904
- token : "constant.numeric",
905
- regex : numRe
906
- }, {
907
- token : "constant.numeric", // hex6 color
908
- regex : "#[a-f0-9]{6}"
909
- }, {
910
- token : "constant.numeric", // hex3 color
911
- regex : "#[a-f0-9]{3}"
912
- }, {
913
- token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
914
- regex : pseudoElements
915
- }, {
916
- token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
917
- regex : pseudoClasses
918
- }, {
919
- include: "url"
920
- }, {
921
- token : keywordMapper,
922
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
923
- }, {
924
- caseInsensitive: true
925
- }],
926
-
927
- url: [{
928
- token : "support.function",
929
- regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
930
- push: [{
931
- token : "support.function",
932
- regex : "\\)",
933
- next : "pop"
970
+ token: "punctuation.operator",
971
+ regex: "[:;]"
934
972
  }, {
935
- defaultToken: "string"
936
- }]
937
- }],
938
-
939
- strings: [{
940
- token : "string.start",
941
- regex : "'",
942
- push : [{
943
- token : "string.end",
944
- regex : "'|$",
945
- next: "pop"
973
+ token: "paren.rparen",
974
+ regex: "\\}",
975
+ next: "start"
946
976
  }, {
947
- include : "escapes"
977
+ include: ["strings", "url", "comments"]
948
978
  }, {
949
- token : "constant.language.escape",
950
- regex : /\\$/,
951
- consumeLineEnd: true
979
+ token: ["constant.numeric", "keyword"],
980
+ regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
952
981
  }, {
953
- defaultToken: "string"
954
- }]
955
- }, {
956
- token : "string.start",
957
- regex : '"',
958
- push : [{
959
- token : "string.end",
960
- regex : '"|$',
961
- next: "pop"
982
+ token: "constant.numeric",
983
+ regex: numRe
962
984
  }, {
963
- include : "escapes"
985
+ token: "constant.numeric",
986
+ regex: "#[a-f0-9]{6}"
964
987
  }, {
965
- token : "constant.language.escape",
966
- regex : /\\$/,
967
- consumeLineEnd: true
988
+ token: "constant.numeric",
989
+ regex: "#[a-f0-9]{3}"
968
990
  }, {
969
- defaultToken: "string"
970
- }]
971
- }],
991
+ token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
992
+ regex: pseudoElements
993
+ }, {
994
+ token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
995
+ regex: pseudoClasses
996
+ }, {
997
+ include: "url"
998
+ }, {
999
+ token: keywordMapper,
1000
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1001
+ }, {
1002
+ caseInsensitive: true
1003
+ }],
1004
+ url: [{
1005
+ token: "support.function",
1006
+ regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
1007
+ push: [{
1008
+ token: "support.function",
1009
+ regex: "\\)",
1010
+ next: "pop"
1011
+ }, {
1012
+ defaultToken: "string"
1013
+ }]
1014
+ }],
1015
+ strings: [{
1016
+ token: "string.start",
1017
+ regex: "'",
1018
+ push: [{
1019
+ token: "string.end",
1020
+ regex: "'|$",
1021
+ next: "pop"
1022
+ }, {
1023
+ include: "escapes"
1024
+ }, {
1025
+ token: "constant.language.escape",
1026
+ regex: /\\$/,
1027
+ consumeLineEnd: true
1028
+ }, {
1029
+ defaultToken: "string"
1030
+ }]
1031
+ }, {
1032
+ token: "string.start",
1033
+ regex: '"',
1034
+ push: [{
1035
+ token: "string.end",
1036
+ regex: '"|$',
1037
+ next: "pop"
1038
+ }, {
1039
+ include: "escapes"
1040
+ }, {
1041
+ token: "constant.language.escape",
1042
+ regex: /\\$/,
1043
+ consumeLineEnd: true
1044
+ }, {
1045
+ defaultToken: "string"
1046
+ }]
1047
+ }],
972
1048
  escapes: [{
973
- token : "constant.language.escape",
974
- regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
975
- }]
976
-
1049
+ token: "constant.language.escape",
1050
+ regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
1051
+ }]
977
1052
  };
978
-
979
1053
  this.normalizeRules();
980
1054
  };
981
-
982
1055
  oop.inherits(CssHighlightRules, TextHighlightRules);
983
-
984
1056
  exports.CssHighlightRules = CssHighlightRules;
985
1057
 
986
1058
  });
987
1059
 
988
- ace.define("ace/mode/css_completions",[], function(require, exports, module) {
989
- "use strict";
990
-
1060
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
991
1061
  var propertyMap = {
992
- "background": {"#$0": 1},
993
- "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
994
- "background-image": {"url('/$0')": 1},
995
- "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
996
- "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
997
- "background-attachment": {"scroll": 1, "fixed": 1},
998
- "background-size": {"cover": 1, "contain": 1},
999
- "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
1000
- "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
1001
- "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
1002
- "border-color": {"#$0": 1},
1003
- "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
1004
- "border-collapse": {"collapse": 1, "separate": 1},
1005
- "bottom": {"px": 1, "em": 1, "%": 1},
1006
- "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
1007
- "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
1008
- "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
1009
- "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
1010
- "empty-cells": {"show": 1, "hide": 1},
1011
- "float": {"left": 1, "right": 1, "none": 1},
1012
- "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
1013
- "font-size": {"px": 1, "em": 1, "%": 1},
1014
- "font-weight": {"bold": 1, "normal": 1},
1015
- "font-style": {"italic": 1, "normal": 1},
1016
- "font-variant": {"normal": 1, "small-caps": 1},
1017
- "height": {"px": 1, "em": 1, "%": 1},
1018
- "left": {"px": 1, "em": 1, "%": 1},
1019
- "letter-spacing": {"normal": 1},
1020
- "line-height": {"normal": 1},
1021
- "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
1022
- "margin": {"px": 1, "em": 1, "%": 1},
1023
- "margin-right": {"px": 1, "em": 1, "%": 1},
1024
- "margin-left": {"px": 1, "em": 1, "%": 1},
1025
- "margin-top": {"px": 1, "em": 1, "%": 1},
1026
- "margin-bottom": {"px": 1, "em": 1, "%": 1},
1027
- "max-height": {"px": 1, "em": 1, "%": 1},
1028
- "max-width": {"px": 1, "em": 1, "%": 1},
1029
- "min-height": {"px": 1, "em": 1, "%": 1},
1030
- "min-width": {"px": 1, "em": 1, "%": 1},
1031
- "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1032
- "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1033
- "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1034
- "padding": {"px": 1, "em": 1, "%": 1},
1035
- "padding-top": {"px": 1, "em": 1, "%": 1},
1036
- "padding-right": {"px": 1, "em": 1, "%": 1},
1037
- "padding-bottom": {"px": 1, "em": 1, "%": 1},
1038
- "padding-left": {"px": 1, "em": 1, "%": 1},
1039
- "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1040
- "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1041
- "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
1042
- "right": {"px": 1, "em": 1, "%": 1},
1043
- "table-layout": {"fixed": 1, "auto": 1},
1044
- "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
1045
- "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
1046
- "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
1047
- "top": {"px": 1, "em": 1, "%": 1},
1048
- "vertical-align": {"top": 1, "bottom": 1},
1049
- "visibility": {"hidden": 1, "visible": 1},
1050
- "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
1051
- "width": {"px": 1, "em": 1, "%": 1},
1052
- "word-spacing": {"normal": 1},
1053
- "filter": {"alpha(opacity=$0100)": 1},
1054
-
1055
- "text-shadow": {"$02px 2px 2px #777": 1},
1056
- "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
1062
+ "background": { "#$0": 1 },
1063
+ "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
1064
+ "background-image": { "url('/$0')": 1 },
1065
+ "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
1066
+ "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
1067
+ "background-attachment": { "scroll": 1, "fixed": 1 },
1068
+ "background-size": { "cover": 1, "contain": 1 },
1069
+ "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1070
+ "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1071
+ "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
1072
+ "border-color": { "#$0": 1 },
1073
+ "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
1074
+ "border-collapse": { "collapse": 1, "separate": 1 },
1075
+ "bottom": { "px": 1, "em": 1, "%": 1 },
1076
+ "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
1077
+ "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
1078
+ "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 },
1079
+ "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
1080
+ "empty-cells": { "show": 1, "hide": 1 },
1081
+ "float": { "left": 1, "right": 1, "none": 1 },
1082
+ "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 },
1083
+ "font-size": { "px": 1, "em": 1, "%": 1 },
1084
+ "font-weight": { "bold": 1, "normal": 1 },
1085
+ "font-style": { "italic": 1, "normal": 1 },
1086
+ "font-variant": { "normal": 1, "small-caps": 1 },
1087
+ "height": { "px": 1, "em": 1, "%": 1 },
1088
+ "left": { "px": 1, "em": 1, "%": 1 },
1089
+ "letter-spacing": { "normal": 1 },
1090
+ "line-height": { "normal": 1 },
1091
+ "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 },
1092
+ "margin": { "px": 1, "em": 1, "%": 1 },
1093
+ "margin-right": { "px": 1, "em": 1, "%": 1 },
1094
+ "margin-left": { "px": 1, "em": 1, "%": 1 },
1095
+ "margin-top": { "px": 1, "em": 1, "%": 1 },
1096
+ "margin-bottom": { "px": 1, "em": 1, "%": 1 },
1097
+ "max-height": { "px": 1, "em": 1, "%": 1 },
1098
+ "max-width": { "px": 1, "em": 1, "%": 1 },
1099
+ "min-height": { "px": 1, "em": 1, "%": 1 },
1100
+ "min-width": { "px": 1, "em": 1, "%": 1 },
1101
+ "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1102
+ "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1103
+ "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1104
+ "padding": { "px": 1, "em": 1, "%": 1 },
1105
+ "padding-top": { "px": 1, "em": 1, "%": 1 },
1106
+ "padding-right": { "px": 1, "em": 1, "%": 1 },
1107
+ "padding-bottom": { "px": 1, "em": 1, "%": 1 },
1108
+ "padding-left": { "px": 1, "em": 1, "%": 1 },
1109
+ "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1110
+ "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1111
+ "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
1112
+ "right": { "px": 1, "em": 1, "%": 1 },
1113
+ "table-layout": { "fixed": 1, "auto": 1 },
1114
+ "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
1115
+ "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
1116
+ "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
1117
+ "top": { "px": 1, "em": 1, "%": 1 },
1118
+ "vertical-align": { "top": 1, "bottom": 1 },
1119
+ "visibility": { "hidden": 1, "visible": 1 },
1120
+ "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
1121
+ "width": { "px": 1, "em": 1, "%": 1 },
1122
+ "word-spacing": { "normal": 1 },
1123
+ "filter": { "alpha(opacity=$0100)": 1 },
1124
+ "text-shadow": { "$02px 2px 2px #777": 1 },
1125
+ "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
1057
1126
  "-moz-border-radius": 1,
1058
1127
  "-moz-border-radius-topright": 1,
1059
1128
  "-moz-border-radius-bottomright": 1,
@@ -1066,81 +1135,71 @@ var propertyMap = {
1066
1135
  "-webkit-border-bottom-left-radius": 1,
1067
1136
  "-moz-box-shadow": 1,
1068
1137
  "-webkit-box-shadow": 1,
1069
- "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1070
- "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1071
- "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
1138
+ "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1139
+ "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1140
+ "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
1072
1141
  };
1073
-
1074
- var CssCompletions = function() {
1075
-
1142
+ var CssCompletions = function () {
1076
1143
  };
1077
-
1078
- (function() {
1079
-
1144
+ (function () {
1080
1145
  this.completionsDefined = false;
1081
-
1082
- this.defineCompletions = function() {
1146
+ this.defineCompletions = function () {
1083
1147
  if (document) {
1084
1148
  var style = document.createElement('c').style;
1085
-
1086
1149
  for (var i in style) {
1087
1150
  if (typeof style[i] !== 'string')
1088
1151
  continue;
1089
-
1090
- var name = i.replace(/[A-Z]/g, function(x) {
1152
+ var name = i.replace(/[A-Z]/g, function (x) {
1091
1153
  return '-' + x.toLowerCase();
1092
1154
  });
1093
-
1094
1155
  if (!propertyMap.hasOwnProperty(name))
1095
1156
  propertyMap[name] = 1;
1096
1157
  }
1097
1158
  }
1098
-
1099
1159
  this.completionsDefined = true;
1100
1160
  };
1101
-
1102
- this.getCompletions = function(state, session, pos, prefix) {
1161
+ this.getCompletions = function (state, session, pos, prefix) {
1103
1162
  if (!this.completionsDefined) {
1104
1163
  this.defineCompletions();
1105
1164
  }
1106
-
1107
- if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") {
1165
+ if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
1108
1166
  var line = session.getLine(pos.row).substr(0, pos.column);
1167
+ var inParens = /\([^)]*$/.test(line);
1168
+ if (inParens) {
1169
+ line = line.substr(line.lastIndexOf('(') + 1);
1170
+ }
1109
1171
  if (/:[^;]+$/.test(line)) {
1110
1172
  /([\w\-]+):[^:]*$/.test(line);
1111
-
1112
1173
  return this.getPropertyValueCompletions(state, session, pos, prefix);
1113
- } else {
1114
- return this.getPropertyCompletions(state, session, pos, prefix);
1174
+ }
1175
+ else {
1176
+ return this.getPropertyCompletions(state, session, pos, prefix, inParens);
1115
1177
  }
1116
1178
  }
1117
-
1118
1179
  return [];
1119
1180
  };
1120
-
1121
- this.getPropertyCompletions = function(state, session, pos, prefix) {
1181
+ this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
1182
+ skipSemicolon = skipSemicolon || false;
1122
1183
  var properties = Object.keys(propertyMap);
1123
- return properties.map(function(property){
1184
+ return properties.map(function (property) {
1124
1185
  return {
1125
1186
  caption: property,
1126
- snippet: property + ': $0;',
1187
+ snippet: property + ': $0' + (skipSemicolon ? '' : ';'),
1127
1188
  meta: "property",
1128
1189
  score: 1000000
1129
1190
  };
1130
1191
  });
1131
1192
  };
1132
-
1133
- this.getPropertyValueCompletions = function(state, session, pos, prefix) {
1193
+ this.getPropertyValueCompletions = function (state, session, pos, prefix) {
1134
1194
  var line = session.getLine(pos.row).substr(0, pos.column);
1135
1195
  var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1136
-
1137
1196
  if (!property)
1138
1197
  return [];
1139
1198
  var values = [];
1140
1199
  if (property in propertyMap && typeof propertyMap[property] === "object") {
1141
1200
  values = Object.keys(propertyMap[property]);
1142
1201
  }
1143
- return values.map(function(value){
1202
+ return values.map(function (value) {
1144
1203
  return {
1145
1204
  caption: value,
1146
1205
  snippet: value,
@@ -1149,24 +1208,18 @@ var CssCompletions = function() {
1149
1208
  };
1150
1209
  });
1151
1210
  };
1152
-
1153
1211
  }).call(CssCompletions.prototype);
1154
-
1155
1212
  exports.CssCompletions = CssCompletions;
1156
- });
1157
1213
 
1158
- ace.define("ace/mode/behaviour/css",[], function(require, exports, module) {
1159
- "use strict";
1214
+ });
1160
1215
 
1216
+ ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict";
1161
1217
  var oop = require("../../lib/oop");
1162
1218
  var Behaviour = require("../behaviour").Behaviour;
1163
1219
  var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1164
1220
  var TokenIterator = require("../../token_iterator").TokenIterator;
1165
-
1166
1221
  var CssBehaviour = function () {
1167
-
1168
1222
  this.inherit(CstyleBehaviour);
1169
-
1170
1223
  this.add("colon", "insertion", function (state, action, editor, session, text) {
1171
1224
  if (text === ':' && editor.selection.isEmpty()) {
1172
1225
  var cursor = editor.getCursorPosition();
@@ -1180,20 +1233,19 @@ var CssBehaviour = function () {
1180
1233
  var rightChar = line.substring(cursor.column, cursor.column + 1);
1181
1234
  if (rightChar === ':') {
1182
1235
  return {
1183
- text: '',
1184
- selection: [1, 1]
1236
+ text: '',
1237
+ selection: [1, 1]
1185
1238
  };
1186
1239
  }
1187
1240
  if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1188
1241
  return {
1189
- text: ':;',
1190
- selection: [1, 1]
1242
+ text: ':;',
1243
+ selection: [1, 1]
1191
1244
  };
1192
1245
  }
1193
1246
  }
1194
1247
  }
1195
1248
  });
1196
-
1197
1249
  this.add("colon", "deletion", function (state, action, editor, session, range) {
1198
1250
  var selected = session.doc.getTextRange(range);
1199
1251
  if (!range.isMultiLine() && selected === ':') {
@@ -1207,13 +1259,12 @@ var CssBehaviour = function () {
1207
1259
  var line = session.doc.getLine(range.start.row);
1208
1260
  var rightChar = line.substring(range.end.column, range.end.column + 1);
1209
1261
  if (rightChar === ';') {
1210
- range.end.column ++;
1262
+ range.end.column++;
1211
1263
  return range;
1212
1264
  }
1213
1265
  }
1214
1266
  }
1215
1267
  });
1216
-
1217
1268
  this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1218
1269
  if (text === ';' && editor.selection.isEmpty()) {
1219
1270
  var cursor = editor.getCursorPosition();
@@ -1221,18 +1272,16 @@ var CssBehaviour = function () {
1221
1272
  var rightChar = line.substring(cursor.column, cursor.column + 1);
1222
1273
  if (rightChar === ';') {
1223
1274
  return {
1224
- text: '',
1225
- selection: [1, 1]
1275
+ text: '',
1276
+ selection: [1, 1]
1226
1277
  };
1227
1278
  }
1228
1279
  }
1229
1280
  });
1230
-
1231
1281
  this.add("!important", "insertion", function (state, action, editor, session, text) {
1232
1282
  if (text === '!' && editor.selection.isEmpty()) {
1233
1283
  var cursor = editor.getCursorPosition();
1234
1284
  var line = session.doc.getLine(cursor.row);
1235
-
1236
1285
  if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1237
1286
  return {
1238
1287
  text: '!important',
@@ -1241,16 +1290,13 @@ var CssBehaviour = function () {
1241
1290
  }
1242
1291
  }
1243
1292
  });
1244
-
1245
1293
  };
1246
1294
  oop.inherits(CssBehaviour, CstyleBehaviour);
1247
-
1248
1295
  exports.CssBehaviour = CssBehaviour;
1249
- });
1250
1296
 
1251
- ace.define("ace/mode/css",[], function(require, exports, module) {
1252
- "use strict";
1297
+ });
1253
1298
 
1299
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1254
1300
  var oop = require("../lib/oop");
1255
1301
  var TextMode = require("./text").Mode;
1256
1302
  var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
@@ -1259,8 +1305,7 @@ var WorkerClient = require("../worker/worker_client").WorkerClient;
1259
1305
  var CssCompletions = require("./css_completions").CssCompletions;
1260
1306
  var CssBehaviour = require("./behaviour/css").CssBehaviour;
1261
1307
  var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1262
-
1263
- var Mode = function() {
1308
+ var Mode = function () {
1264
1309
  this.HighlightRules = CssHighlightRules;
1265
1310
  this.$outdent = new MatchingBraceOutdent();
1266
1311
  this.$behaviour = new CssBehaviour();
@@ -1268,361 +1313,311 @@ var Mode = function() {
1268
1313
  this.foldingRules = new CStyleFoldMode();
1269
1314
  };
1270
1315
  oop.inherits(Mode, TextMode);
1271
-
1272
- (function() {
1273
-
1316
+ (function () {
1274
1317
  this.foldingRules = "cStyle";
1275
- this.blockComment = {start: "/*", end: "*/"};
1276
-
1277
- this.getNextLineIndent = function(state, line, tab) {
1318
+ this.blockComment = { start: "/*", end: "*/" };
1319
+ this.getNextLineIndent = function (state, line, tab) {
1278
1320
  var indent = this.$getIndent(line);
1279
1321
  var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1280
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
1322
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1281
1323
  return indent;
1282
1324
  }
1283
-
1284
1325
  var match = line.match(/^.*\{\s*$/);
1285
1326
  if (match) {
1286
1327
  indent += tab;
1287
1328
  }
1288
-
1289
1329
  return indent;
1290
1330
  };
1291
-
1292
- this.checkOutdent = function(state, line, input) {
1331
+ this.checkOutdent = function (state, line, input) {
1293
1332
  return this.$outdent.checkOutdent(line, input);
1294
1333
  };
1295
-
1296
- this.autoOutdent = function(state, doc, row) {
1334
+ this.autoOutdent = function (state, doc, row) {
1297
1335
  this.$outdent.autoOutdent(doc, row);
1298
1336
  };
1299
-
1300
- this.getCompletions = function(state, session, pos, prefix) {
1337
+ this.getCompletions = function (state, session, pos, prefix) {
1301
1338
  return this.$completer.getCompletions(state, session, pos, prefix);
1302
1339
  };
1303
-
1304
- this.createWorker = function(session) {
1340
+ this.createWorker = function (session) {
1305
1341
  var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1306
1342
  worker.attachToDocument(session.getDocument());
1307
-
1308
- worker.on("annotate", function(e) {
1343
+ worker.on("annotate", function (e) {
1309
1344
  session.setAnnotations(e.data);
1310
1345
  });
1311
-
1312
- worker.on("terminate", function() {
1346
+ worker.on("terminate", function () {
1313
1347
  session.clearAnnotations();
1314
1348
  });
1315
-
1316
1349
  return worker;
1317
1350
  };
1318
-
1319
1351
  this.$id = "ace/mode/css";
1320
1352
  this.snippetFileId = "ace/snippets/css";
1321
1353
  }).call(Mode.prototype);
1322
-
1323
1354
  exports.Mode = Mode;
1324
1355
 
1325
1356
  });
1326
1357
 
1327
- ace.define("ace/mode/xml_highlight_rules",[], function(require, exports, module) {
1328
- "use strict";
1329
-
1358
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
1330
1359
  var oop = require("../lib/oop");
1331
1360
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1332
-
1333
- var XmlHighlightRules = function(normalize) {
1361
+ var XmlHighlightRules = function (normalize) {
1334
1362
  var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
1335
-
1336
1363
  this.$rules = {
1337
- start : [
1338
- {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
1364
+ start: [
1365
+ { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
1339
1366
  {
1340
- token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
1341
- regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
1367
+ token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
1368
+ regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
1342
1369
  },
1343
- {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
1370
+ { token: "comment.start.xml", regex: "<\\!--", next: "comment" },
1344
1371
  {
1345
- token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
1346
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
1372
+ token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
1373
+ regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
1347
1374
  },
1348
- {include : "tag"},
1349
- {token : "text.end-tag-open.xml", regex: "</"},
1350
- {token : "text.tag-open.xml", regex: "<"},
1351
- {include : "reference"},
1352
- {defaultToken : "text.xml"}
1375
+ { include: "tag" },
1376
+ { token: "text.end-tag-open.xml", regex: "</" },
1377
+ { token: "text.tag-open.xml", regex: "<" },
1378
+ { include: "reference" },
1379
+ { defaultToken: "text.xml" }
1353
1380
  ],
1354
-
1355
- processing_instruction : [{
1356
- token : "entity.other.attribute-name.decl-attribute-name.xml",
1357
- regex : tagRegex
1358
- }, {
1359
- token : "keyword.operator.decl-attribute-equals.xml",
1360
- regex : "="
1361
- }, {
1362
- include: "whitespace"
1363
- }, {
1364
- include: "string"
1365
- }, {
1366
- token : "punctuation.xml-decl.xml",
1367
- regex : "\\?>",
1368
- next : "start"
1369
- }],
1370
-
1371
- doctype : [
1372
- {include : "whitespace"},
1373
- {include : "string"},
1374
- {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
1375
- {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
1376
- {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
1381
+ processing_instruction: [{
1382
+ token: "entity.other.attribute-name.decl-attribute-name.xml",
1383
+ regex: tagRegex
1384
+ }, {
1385
+ token: "keyword.operator.decl-attribute-equals.xml",
1386
+ regex: "="
1387
+ }, {
1388
+ include: "whitespace"
1389
+ }, {
1390
+ include: "string"
1391
+ }, {
1392
+ token: "punctuation.xml-decl.xml",
1393
+ regex: "\\?>",
1394
+ next: "start"
1395
+ }],
1396
+ doctype: [
1397
+ { include: "whitespace" },
1398
+ { include: "string" },
1399
+ { token: "xml-pe.doctype.xml", regex: ">", next: "start" },
1400
+ { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
1401
+ { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
1377
1402
  ],
1378
-
1379
- int_subset : [{
1380
- token : "text.xml",
1381
- regex : "\\s+"
1382
- }, {
1383
- token: "punctuation.int-subset.xml",
1384
- regex: "]",
1385
- next: "pop"
1386
- }, {
1387
- token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
1388
- regex : "(<\\!)(" + tagRegex + ")",
1389
- push : [{
1390
- token : "text",
1391
- regex : "\\s+"
1392
- },
1393
- {
1394
- token : "punctuation.markup-decl.xml",
1395
- regex : ">",
1396
- next : "pop"
1397
- },
1398
- {include : "string"}]
1399
- }],
1400
-
1401
- cdata : [
1402
- {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
1403
- {token : "text.xml", regex : "\\s+"},
1404
- {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
1403
+ int_subset: [{
1404
+ token: "text.xml",
1405
+ regex: "\\s+"
1406
+ }, {
1407
+ token: "punctuation.int-subset.xml",
1408
+ regex: "]",
1409
+ next: "pop"
1410
+ }, {
1411
+ token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
1412
+ regex: "(<\\!)(" + tagRegex + ")",
1413
+ push: [{
1414
+ token: "text",
1415
+ regex: "\\s+"
1416
+ },
1417
+ {
1418
+ token: "punctuation.markup-decl.xml",
1419
+ regex: ">",
1420
+ next: "pop"
1421
+ },
1422
+ { include: "string" }]
1423
+ }],
1424
+ cdata: [
1425
+ { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
1426
+ { token: "text.xml", regex: "\\s+" },
1427
+ { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
1405
1428
  ],
1406
-
1407
- comment : [
1408
- {token : "comment.end.xml", regex : "-->", next : "start"},
1409
- {defaultToken : "comment.xml"}
1429
+ comment: [
1430
+ { token: "comment.end.xml", regex: "-->", next: "start" },
1431
+ { defaultToken: "comment.xml" }
1410
1432
  ],
1411
-
1412
- reference : [{
1413
- token : "constant.language.escape.reference.xml",
1414
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1415
- }],
1416
-
1417
- attr_reference : [{
1418
- token : "constant.language.escape.reference.attribute-value.xml",
1419
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1420
- }],
1421
-
1422
- tag : [{
1423
- token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
1424
- regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
1425
- next: [
1426
- {include : "attributes"},
1427
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
1428
- ]
1429
- }],
1430
-
1431
- tag_whitespace : [
1432
- {token : "text.tag-whitespace.xml", regex : "\\s+"}
1433
+ reference: [{
1434
+ token: "constant.language.escape.reference.xml",
1435
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1436
+ }],
1437
+ attr_reference: [{
1438
+ token: "constant.language.escape.reference.attribute-value.xml",
1439
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1440
+ }],
1441
+ tag: [{
1442
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
1443
+ regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
1444
+ next: [
1445
+ { include: "attributes" },
1446
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1447
+ ]
1448
+ }],
1449
+ tag_whitespace: [
1450
+ { token: "text.tag-whitespace.xml", regex: "\\s+" }
1433
1451
  ],
1434
- whitespace : [
1435
- {token : "text.whitespace.xml", regex : "\\s+"}
1452
+ whitespace: [
1453
+ { token: "text.whitespace.xml", regex: "\\s+" }
1436
1454
  ],
1437
1455
  string: [{
1438
- token : "string.xml",
1439
- regex : "'",
1440
- push : [
1441
- {token : "string.xml", regex: "'", next: "pop"},
1442
- {defaultToken : "string.xml"}
1443
- ]
1444
- }, {
1445
- token : "string.xml",
1446
- regex : '"',
1447
- push : [
1448
- {token : "string.xml", regex: '"', next: "pop"},
1449
- {defaultToken : "string.xml"}
1450
- ]
1451
- }],
1452
-
1456
+ token: "string.xml",
1457
+ regex: "'",
1458
+ push: [
1459
+ { token: "string.xml", regex: "'", next: "pop" },
1460
+ { defaultToken: "string.xml" }
1461
+ ]
1462
+ }, {
1463
+ token: "string.xml",
1464
+ regex: '"',
1465
+ push: [
1466
+ { token: "string.xml", regex: '"', next: "pop" },
1467
+ { defaultToken: "string.xml" }
1468
+ ]
1469
+ }],
1453
1470
  attributes: [{
1454
- token : "entity.other.attribute-name.xml",
1455
- regex : tagRegex
1456
- }, {
1457
- token : "keyword.operator.attribute-equals.xml",
1458
- regex : "="
1459
- }, {
1460
- include: "tag_whitespace"
1461
- }, {
1462
- include: "attribute_value"
1463
- }],
1464
-
1471
+ token: "entity.other.attribute-name.xml",
1472
+ regex: tagRegex
1473
+ }, {
1474
+ token: "keyword.operator.attribute-equals.xml",
1475
+ regex: "="
1476
+ }, {
1477
+ include: "tag_whitespace"
1478
+ }, {
1479
+ include: "attribute_value"
1480
+ }],
1465
1481
  attribute_value: [{
1466
- token : "string.attribute-value.xml",
1467
- regex : "'",
1468
- push : [
1469
- {token : "string.attribute-value.xml", regex: "'", next: "pop"},
1470
- {include : "attr_reference"},
1471
- {defaultToken : "string.attribute-value.xml"}
1472
- ]
1473
- }, {
1474
- token : "string.attribute-value.xml",
1475
- regex : '"',
1476
- push : [
1477
- {token : "string.attribute-value.xml", regex: '"', next: "pop"},
1478
- {include : "attr_reference"},
1479
- {defaultToken : "string.attribute-value.xml"}
1480
- ]
1481
- }]
1482
+ token: "string.attribute-value.xml",
1483
+ regex: "'",
1484
+ push: [
1485
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
1486
+ { include: "attr_reference" },
1487
+ { defaultToken: "string.attribute-value.xml" }
1488
+ ]
1489
+ }, {
1490
+ token: "string.attribute-value.xml",
1491
+ regex: '"',
1492
+ push: [
1493
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
1494
+ { include: "attr_reference" },
1495
+ { defaultToken: "string.attribute-value.xml" }
1496
+ ]
1497
+ }]
1482
1498
  };
1483
-
1484
1499
  if (this.constructor === XmlHighlightRules)
1485
1500
  this.normalizeRules();
1486
1501
  };
1487
-
1488
-
1489
- (function() {
1490
-
1491
- this.embedTagRules = function(HighlightRules, prefix, tag){
1502
+ (function () {
1503
+ this.embedTagRules = function (HighlightRules, prefix, tag) {
1492
1504
  this.$rules.tag.unshift({
1493
- token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1494
- regex : "(<)(" + tag + "(?=\\s|>|$))",
1505
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1506
+ regex: "(<)(" + tag + "(?=\\s|>|$))",
1495
1507
  next: [
1496
- {include : "attributes"},
1497
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
1508
+ { include: "attributes" },
1509
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
1498
1510
  ]
1499
1511
  });
1500
-
1501
1512
  this.$rules[tag + "-end"] = [
1502
- {include : "attributes"},
1503
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
1504
- onMatch : function(value, currentState, stack) {
1513
+ { include: "attributes" },
1514
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
1515
+ onMatch: function (value, currentState, stack) {
1505
1516
  stack.splice(0);
1506
1517
  return this.token;
1507
- }}
1518
+ } }
1508
1519
  ];
1509
-
1510
1520
  this.embedRules(HighlightRules, prefix, [{
1511
- token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1512
- regex : "(</)(" + tag + "(?=\\s|>|$))",
1513
- next: tag + "-end"
1514
- }, {
1515
- token: "string.cdata.xml",
1516
- regex : "<\\!\\[CDATA\\["
1517
- }, {
1518
- token: "string.cdata.xml",
1519
- regex : "\\]\\]>"
1520
- }]);
1521
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1522
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
1523
+ next: tag + "-end"
1524
+ }, {
1525
+ token: "string.cdata.xml",
1526
+ regex: "<\\!\\[CDATA\\["
1527
+ }, {
1528
+ token: "string.cdata.xml",
1529
+ regex: "\\]\\]>"
1530
+ }]);
1521
1531
  };
1522
-
1523
1532
  }).call(TextHighlightRules.prototype);
1524
-
1525
1533
  oop.inherits(XmlHighlightRules, TextHighlightRules);
1526
-
1527
1534
  exports.XmlHighlightRules = XmlHighlightRules;
1528
- });
1529
1535
 
1530
- ace.define("ace/mode/html_highlight_rules",[], function(require, exports, module) {
1531
- "use strict";
1536
+ });
1532
1537
 
1538
+ ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
1533
1539
  var oop = require("../lib/oop");
1534
1540
  var lang = require("../lib/lang");
1535
1541
  var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1536
1542
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1537
1543
  var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1538
-
1539
1544
  var tagMap = lang.createMap({
1540
- a : 'anchor',
1541
- button : 'form',
1542
- form : 'form',
1543
- img : 'image',
1544
- input : 'form',
1545
- label : 'form',
1546
- option : 'form',
1547
- script : 'script',
1548
- select : 'form',
1549
- textarea : 'form',
1550
- style : 'style',
1551
- table : 'table',
1552
- tbody : 'table',
1553
- td : 'table',
1554
- tfoot : 'table',
1555
- th : 'table',
1556
- tr : 'table'
1545
+ a: 'anchor',
1546
+ button: 'form',
1547
+ form: 'form',
1548
+ img: 'image',
1549
+ input: 'form',
1550
+ label: 'form',
1551
+ option: 'form',
1552
+ script: 'script',
1553
+ select: 'form',
1554
+ textarea: 'form',
1555
+ style: 'style',
1556
+ table: 'table',
1557
+ tbody: 'table',
1558
+ td: 'table',
1559
+ tfoot: 'table',
1560
+ th: 'table',
1561
+ tr: 'table'
1557
1562
  });
1558
-
1559
- var HtmlHighlightRules = function() {
1563
+ var HtmlHighlightRules = function () {
1560
1564
  XmlHighlightRules.call(this);
1561
-
1562
1565
  this.addRules({
1563
1566
  attributes: [{
1564
- include : "tag_whitespace"
1565
- }, {
1566
- token : "entity.other.attribute-name.xml",
1567
- regex : "[-_a-zA-Z0-9:.]+"
1568
- }, {
1569
- token : "keyword.operator.attribute-equals.xml",
1570
- regex : "=",
1571
- push : [{
1572
1567
  include: "tag_whitespace"
1573
1568
  }, {
1574
- token : "string.unquoted.attribute-value.html",
1575
- regex : "[^<>='\"`\\s]+",
1576
- next : "pop"
1577
- }, {
1578
- token : "empty",
1579
- regex : "",
1580
- next : "pop"
1581
- }]
1582
- }, {
1583
- include : "attribute_value"
1584
- }],
1569
+ token: "entity.other.attribute-name.xml",
1570
+ regex: "[-_a-zA-Z0-9:.]+"
1571
+ }, {
1572
+ token: "keyword.operator.attribute-equals.xml",
1573
+ regex: "=",
1574
+ push: [{
1575
+ include: "tag_whitespace"
1576
+ }, {
1577
+ token: "string.unquoted.attribute-value.html",
1578
+ regex: "[^<>='\"`\\s]+",
1579
+ next: "pop"
1580
+ }, {
1581
+ token: "empty",
1582
+ regex: "",
1583
+ next: "pop"
1584
+ }]
1585
+ }, {
1586
+ include: "attribute_value"
1587
+ }],
1585
1588
  tag: [{
1586
- token : function(start, tag) {
1587
- var group = tagMap[tag];
1588
- return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1589
- "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1590
- },
1591
- regex : "(</?)([-_a-zA-Z0-9:.]+)",
1592
- next: "tag_stuff"
1593
- }],
1589
+ token: function (start, tag) {
1590
+ var group = tagMap[tag];
1591
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1592
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1593
+ },
1594
+ regex: "(</?)([-_a-zA-Z0-9:.]+)",
1595
+ next: "tag_stuff"
1596
+ }],
1594
1597
  tag_stuff: [
1595
- {include : "attributes"},
1596
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
1598
+ { include: "attributes" },
1599
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1597
1600
  ]
1598
1601
  });
1599
-
1600
1602
  this.embedTagRules(CssHighlightRules, "css-", "style");
1601
- this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
1602
-
1603
+ this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script");
1603
1604
  if (this.constructor === HtmlHighlightRules)
1604
1605
  this.normalizeRules();
1605
1606
  };
1606
-
1607
1607
  oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1608
-
1609
1608
  exports.HtmlHighlightRules = HtmlHighlightRules;
1610
- });
1611
1609
 
1612
- ace.define("ace/mode/behaviour/xml",[], function(require, exports, module) {
1613
- "use strict";
1610
+ });
1614
1611
 
1612
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module){"use strict";
1615
1613
  var oop = require("../../lib/oop");
1616
1614
  var Behaviour = require("../behaviour").Behaviour;
1617
1615
  var TokenIterator = require("../../token_iterator").TokenIterator;
1618
1616
  var lang = require("../../lib/lang");
1619
-
1620
1617
  function is(token, type) {
1621
1618
  return token && token.type.lastIndexOf(type + ".xml") > -1;
1622
1619
  }
1623
-
1624
1620
  var XmlBehaviour = function () {
1625
-
1626
1621
  this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1627
1622
  if (text == '"' || text == "'") {
1628
1623
  var quote = text;
@@ -1633,26 +1628,21 @@ var XmlBehaviour = function () {
1633
1628
  selection: false
1634
1629
  };
1635
1630
  }
1636
-
1637
1631
  var cursor = editor.getCursorPosition();
1638
1632
  var line = session.doc.getLine(cursor.row);
1639
1633
  var rightChar = line.substring(cursor.column, cursor.column + 1);
1640
1634
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
1641
1635
  var token = iterator.getCurrentToken();
1642
-
1643
1636
  if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1644
1637
  return {
1645
1638
  text: "",
1646
1639
  selection: [1, 1]
1647
1640
  };
1648
1641
  }
1649
-
1650
1642
  if (!token)
1651
1643
  token = iterator.stepBackward();
1652
-
1653
1644
  if (!token)
1654
1645
  return;
1655
-
1656
1646
  while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1657
1647
  token = iterator.stepBackward();
1658
1648
  }
@@ -1665,8 +1655,7 @@ var XmlBehaviour = function () {
1665
1655
  }
1666
1656
  }
1667
1657
  });
1668
-
1669
- this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
1658
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
1670
1659
  var selected = session.doc.getTextRange(range);
1671
1660
  if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1672
1661
  var line = session.doc.getLine(range.start.row);
@@ -1677,7 +1666,6 @@ var XmlBehaviour = function () {
1677
1666
  }
1678
1667
  }
1679
1668
  });
1680
-
1681
1669
  this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1682
1670
  if (text == '>') {
1683
1671
  var position = editor.getSelectionRange().start;
@@ -1698,7 +1686,6 @@ var XmlBehaviour = function () {
1698
1686
  iterator.stepBackward();
1699
1687
  }
1700
1688
  }
1701
-
1702
1689
  if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1703
1690
  return;
1704
1691
  while (!is(token, "tag-name")) {
@@ -1708,63 +1695,54 @@ var XmlBehaviour = function () {
1708
1695
  break;
1709
1696
  }
1710
1697
  }
1711
-
1712
1698
  var tokenRow = iterator.getCurrentTokenRow();
1713
1699
  var tokenColumn = iterator.getCurrentTokenColumn();
1714
1700
  if (is(iterator.stepBackward(), "end-tag-open"))
1715
1701
  return;
1716
-
1717
1702
  var element = token.value;
1718
1703
  if (tokenRow == position.row)
1719
1704
  element = element.substring(0, position.column - tokenColumn);
1720
-
1721
1705
  if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1722
- return;
1723
-
1706
+ return;
1724
1707
  return {
1725
- text: ">" + "</" + element + ">",
1726
- selection: [1, 1]
1708
+ text: ">" + "</" + element + ">",
1709
+ selection: [1, 1]
1727
1710
  };
1728
1711
  }
1729
1712
  });
1730
-
1731
1713
  this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1732
1714
  if (text == "\n") {
1733
1715
  var cursor = editor.getCursorPosition();
1734
1716
  var line = session.getLine(cursor.row);
1735
1717
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
1736
1718
  var token = iterator.getCurrentToken();
1737
-
1738
1719
  if (token && token.type.indexOf("tag-close") !== -1) {
1739
1720
  if (token.value == "/>")
1740
1721
  return;
1741
1722
  while (token && token.type.indexOf("tag-name") === -1) {
1742
1723
  token = iterator.stepBackward();
1743
1724
  }
1744
-
1745
1725
  if (!token) {
1746
1726
  return;
1747
1727
  }
1748
-
1749
1728
  var tag = token.value;
1750
1729
  var row = iterator.getCurrentTokenRow();
1751
1730
  token = iterator.stepBackward();
1752
1731
  if (!token || token.type.indexOf("end-tag") !== -1) {
1753
1732
  return;
1754
1733
  }
1755
-
1756
1734
  if (this.voidElements && !this.voidElements[tag]) {
1757
- var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
1735
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1758
1736
  var line = session.getLine(row);
1759
1737
  var nextIndent = this.$getIndent(line);
1760
1738
  var indent = nextIndent + session.getTabString();
1761
-
1762
1739
  if (nextToken && nextToken.value === "</") {
1763
1740
  return {
1764
1741
  text: "\n" + indent + "\n" + nextIndent,
1765
1742
  selection: [1, indent.length, 1, indent.length]
1766
1743
  };
1767
- } else {
1744
+ }
1745
+ else {
1768
1746
  return {
1769
1747
  text: "\n" + indent
1770
1748
  };
@@ -1773,31 +1751,23 @@ var XmlBehaviour = function () {
1773
1751
  }
1774
1752
  }
1775
1753
  });
1776
-
1777
1754
  };
1778
-
1779
1755
  oop.inherits(XmlBehaviour, Behaviour);
1780
-
1781
1756
  exports.XmlBehaviour = XmlBehaviour;
1782
- });
1783
1757
 
1784
- ace.define("ace/mode/folding/mixed",[], function(require, exports, module) {
1785
- "use strict";
1758
+ });
1786
1759
 
1760
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1787
1761
  var oop = require("../../lib/oop");
1788
1762
  var BaseFoldMode = require("./fold_mode").FoldMode;
1789
-
1790
- var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
1763
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
1791
1764
  this.defaultMode = defaultMode;
1792
1765
  this.subModes = subModes;
1793
1766
  };
1794
1767
  oop.inherits(FoldMode, BaseFoldMode);
1795
-
1796
- (function() {
1797
-
1798
-
1799
- this.$getMode = function(state) {
1800
- if (typeof state != "string")
1768
+ (function () {
1769
+ this.$getMode = function (state) {
1770
+ if (typeof state != "string")
1801
1771
  state = state[0];
1802
1772
  for (var key in this.subModes) {
1803
1773
  if (state.indexOf(key) === 0)
@@ -1805,96 +1775,70 @@ oop.inherits(FoldMode, BaseFoldMode);
1805
1775
  }
1806
1776
  return null;
1807
1777
  };
1808
-
1809
- this.$tryMode = function(state, session, foldStyle, row) {
1778
+ this.$tryMode = function (state, session, foldStyle, row) {
1810
1779
  var mode = this.$getMode(state);
1811
1780
  return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1812
1781
  };
1813
-
1814
- this.getFoldWidget = function(session, foldStyle, row) {
1815
- return (
1816
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
1782
+ this.getFoldWidget = function (session, foldStyle, row) {
1783
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
1817
1784
  this.$tryMode(session.getState(row), session, foldStyle, row) ||
1818
- this.defaultMode.getFoldWidget(session, foldStyle, row)
1819
- );
1785
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
1820
1786
  };
1821
-
1822
- this.getFoldWidgetRange = function(session, foldStyle, row) {
1823
- var mode = this.$getMode(session.getState(row-1));
1824
-
1787
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1788
+ var mode = this.$getMode(session.getState(row - 1));
1825
1789
  if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1826
1790
  mode = this.$getMode(session.getState(row));
1827
-
1828
1791
  if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1829
1792
  mode = this.defaultMode;
1830
-
1831
1793
  return mode.getFoldWidgetRange(session, foldStyle, row);
1832
1794
  };
1833
-
1834
1795
  }).call(FoldMode.prototype);
1835
1796
 
1836
1797
  });
1837
1798
 
1838
- ace.define("ace/mode/folding/xml",[], function(require, exports, module) {
1839
- "use strict";
1840
-
1799
+ ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1841
1800
  var oop = require("../../lib/oop");
1842
- var lang = require("../../lib/lang");
1843
1801
  var Range = require("../../range").Range;
1844
1802
  var BaseFoldMode = require("./fold_mode").FoldMode;
1845
- var TokenIterator = require("../../token_iterator").TokenIterator;
1846
-
1847
- var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
1803
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1848
1804
  BaseFoldMode.call(this);
1849
1805
  this.voidElements = voidElements || {};
1850
1806
  this.optionalEndTags = oop.mixin({}, this.voidElements);
1851
1807
  if (optionalEndTags)
1852
1808
  oop.mixin(this.optionalEndTags, optionalEndTags);
1853
-
1854
1809
  };
1855
1810
  oop.inherits(FoldMode, BaseFoldMode);
1856
-
1857
- var Tag = function() {
1811
+ var Tag = function () {
1858
1812
  this.tagName = "";
1859
1813
  this.closing = false;
1860
1814
  this.selfClosing = false;
1861
- this.start = {row: 0, column: 0};
1862
- this.end = {row: 0, column: 0};
1815
+ this.start = { row: 0, column: 0 };
1816
+ this.end = { row: 0, column: 0 };
1863
1817
  };
1864
-
1865
1818
  function is(token, type) {
1866
1819
  return token.type.lastIndexOf(type + ".xml") > -1;
1867
1820
  }
1868
-
1869
- (function() {
1870
-
1871
- this.getFoldWidget = function(session, foldStyle, row) {
1821
+ (function () {
1822
+ this.getFoldWidget = function (session, foldStyle, row) {
1872
1823
  var tag = this._getFirstTagInLine(session, row);
1873
-
1874
1824
  if (!tag)
1875
1825
  return this.getCommentFoldWidget(session, row);
1876
-
1877
1826
  if (tag.closing || (!tag.tagName && tag.selfClosing))
1878
- return foldStyle == "markbeginend" ? "end" : "";
1879
-
1827
+ return foldStyle === "markbeginend" ? "end" : "";
1880
1828
  if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1881
1829
  return "";
1882
-
1883
1830
  if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1884
1831
  return "";
1885
-
1886
1832
  return "start";
1887
1833
  };
1888
-
1889
- this.getCommentFoldWidget = function(session, row) {
1834
+ this.getCommentFoldWidget = function (session, row) {
1890
1835
  if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1891
1836
  return "start";
1892
1837
  return "";
1893
1838
  };
1894
- this._getFirstTagInLine = function(session, row) {
1839
+ this._getFirstTagInLine = function (session, row) {
1895
1840
  var tokens = session.getTokens(row);
1896
1841
  var tag = new Tag();
1897
-
1898
1842
  for (var i = 0; i < tokens.length; i++) {
1899
1843
  var token = tokens[i];
1900
1844
  if (is(token, "tag-open")) {
@@ -1914,17 +1858,16 @@ function is(token, type) {
1914
1858
  }
1915
1859
  }
1916
1860
  return tag;
1917
- } else if (is(token, "tag-close")) {
1861
+ }
1862
+ else if (is(token, "tag-close")) {
1918
1863
  tag.selfClosing = token.value == '/>';
1919
1864
  return tag;
1920
1865
  }
1921
1866
  tag.start.column += token.value.length;
1922
1867
  }
1923
-
1924
1868
  return null;
1925
1869
  };
1926
-
1927
- this._findEndTagInLine = function(session, row, tagName, startColumn) {
1870
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1928
1871
  var tokens = session.getTokens(row);
1929
1872
  var column = 0;
1930
1873
  for (var i = 0; i < tokens.length; i++) {
@@ -1940,174 +1883,37 @@ function is(token, type) {
1940
1883
  }
1941
1884
  return false;
1942
1885
  };
1943
- this._readTagForward = function(iterator) {
1944
- var token = iterator.getCurrentToken();
1945
- if (!token)
1946
- return null;
1947
-
1948
- var tag = new Tag();
1949
- do {
1950
- if (is(token, "tag-open")) {
1951
- tag.closing = is(token, "end-tag-open");
1952
- tag.start.row = iterator.getCurrentTokenRow();
1953
- tag.start.column = iterator.getCurrentTokenColumn();
1954
- } else if (is(token, "tag-name")) {
1955
- tag.tagName = token.value;
1956
- } else if (is(token, "tag-close")) {
1957
- tag.selfClosing = token.value == "/>";
1958
- tag.end.row = iterator.getCurrentTokenRow();
1959
- tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1960
- iterator.stepForward();
1961
- return tag;
1962
- }
1963
- } while(token = iterator.stepForward());
1964
-
1965
- return null;
1966
- };
1967
-
1968
- this._readTagBackward = function(iterator) {
1969
- var token = iterator.getCurrentToken();
1970
- if (!token)
1971
- return null;
1972
-
1973
- var tag = new Tag();
1974
- do {
1975
- if (is(token, "tag-open")) {
1976
- tag.closing = is(token, "end-tag-open");
1977
- tag.start.row = iterator.getCurrentTokenRow();
1978
- tag.start.column = iterator.getCurrentTokenColumn();
1979
- iterator.stepBackward();
1980
- return tag;
1981
- } else if (is(token, "tag-name")) {
1982
- tag.tagName = token.value;
1983
- } else if (is(token, "tag-close")) {
1984
- tag.selfClosing = token.value == "/>";
1985
- tag.end.row = iterator.getCurrentTokenRow();
1986
- tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1987
- }
1988
- } while(token = iterator.stepBackward());
1989
-
1990
- return null;
1991
- };
1992
-
1993
- this._pop = function(stack, tag) {
1994
- while (stack.length) {
1995
-
1996
- var top = stack[stack.length-1];
1997
- if (!tag || top.tagName == tag.tagName) {
1998
- return stack.pop();
1999
- }
2000
- else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
2001
- stack.pop();
2002
- continue;
2003
- } else {
2004
- return null;
2005
- }
1886
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1887
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1888
+ if (tags) {
1889
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
2006
1890
  }
2007
- };
2008
-
2009
- this.getFoldWidgetRange = function(session, foldStyle, row) {
2010
- var firstTag = this._getFirstTagInLine(session, row);
2011
-
2012
- if (!firstTag) {
1891
+ else {
2013
1892
  return this.getCommentFoldWidget(session, row)
2014
1893
  && session.getCommentFoldRange(row, session.getLine(row).length);
2015
1894
  }
2016
-
2017
- var isBackward = firstTag.closing || firstTag.selfClosing;
2018
- var stack = [];
2019
- var tag;
2020
-
2021
- if (!isBackward) {
2022
- var iterator = new TokenIterator(session, row, firstTag.start.column);
2023
- var start = {
2024
- row: row,
2025
- column: firstTag.start.column + firstTag.tagName.length + 2
2026
- };
2027
- if (firstTag.start.row == firstTag.end.row)
2028
- start.column = firstTag.end.column;
2029
- while (tag = this._readTagForward(iterator)) {
2030
- if (tag.selfClosing) {
2031
- if (!stack.length) {
2032
- tag.start.column += tag.tagName.length + 2;
2033
- tag.end.column -= 2;
2034
- return Range.fromPoints(tag.start, tag.end);
2035
- } else
2036
- continue;
2037
- }
2038
-
2039
- if (tag.closing) {
2040
- this._pop(stack, tag);
2041
- if (stack.length == 0)
2042
- return Range.fromPoints(start, tag.start);
2043
- }
2044
- else {
2045
- stack.push(tag);
2046
- }
2047
- }
2048
- }
2049
- else {
2050
- var iterator = new TokenIterator(session, row, firstTag.end.column);
2051
- var end = {
2052
- row: row,
2053
- column: firstTag.start.column
2054
- };
2055
-
2056
- while (tag = this._readTagBackward(iterator)) {
2057
- if (tag.selfClosing) {
2058
- if (!stack.length) {
2059
- tag.start.column += tag.tagName.length + 2;
2060
- tag.end.column -= 2;
2061
- return Range.fromPoints(tag.start, tag.end);
2062
- } else
2063
- continue;
2064
- }
2065
-
2066
- if (!tag.closing) {
2067
- this._pop(stack, tag);
2068
- if (stack.length == 0) {
2069
- tag.start.column += tag.tagName.length + 2;
2070
- if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
2071
- tag.start.column = tag.end.column;
2072
- return Range.fromPoints(tag.start, end);
2073
- }
2074
- }
2075
- else {
2076
- stack.push(tag);
2077
- }
2078
- }
2079
- }
2080
-
2081
1895
  };
2082
-
2083
1896
  }).call(FoldMode.prototype);
2084
1897
 
2085
1898
  });
2086
1899
 
2087
- ace.define("ace/mode/folding/html",[], function(require, exports, module) {
2088
- "use strict";
2089
-
1900
+ ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2090
1901
  var oop = require("../../lib/oop");
2091
1902
  var MixedFoldMode = require("./mixed").FoldMode;
2092
1903
  var XmlFoldMode = require("./xml").FoldMode;
2093
1904
  var CStyleFoldMode = require("./cstyle").FoldMode;
2094
-
2095
- var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
1905
+ var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
2096
1906
  MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2097
1907
  "js-": new CStyleFoldMode(),
2098
1908
  "css-": new CStyleFoldMode()
2099
1909
  });
2100
1910
  };
2101
-
2102
1911
  oop.inherits(FoldMode, MixedFoldMode);
2103
1912
 
2104
1913
  });
2105
1914
 
2106
- ace.define("ace/mode/html_completions",[], function(require, exports, module) {
2107
- "use strict";
2108
-
1915
+ ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict";
2109
1916
  var TokenIterator = require("../token_iterator").TokenIterator;
2110
-
2111
1917
  var commonAttributes = [
2112
1918
  "accesskey",
2113
1919
  "class",
@@ -2131,7 +1937,6 @@ var commonAttributes = [
2131
1937
  "title",
2132
1938
  "translate"
2133
1939
  ];
2134
-
2135
1940
  var eventAttributes = [
2136
1941
  "onabort",
2137
1942
  "onblur",
@@ -2189,49 +1994,47 @@ var eventAttributes = [
2189
1994
  "onvolumechange",
2190
1995
  "onwaiting"
2191
1996
  ];
2192
-
2193
1997
  var globalAttributes = commonAttributes.concat(eventAttributes);
2194
-
2195
1998
  var attributeMap = {
2196
- "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
1999
+ "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 },
2197
2000
  "abbr": {},
2198
2001
  "address": {},
2199
- "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2200
- "article": {"pubdate": 1},
2002
+ "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 },
2003
+ "article": { "pubdate": 1 },
2201
2004
  "aside": {},
2202
- "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2005
+ "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
2203
2006
  "b": {},
2204
- "base": {"href": 1, "target": 1},
2007
+ "base": { "href": 1, "target": 1 },
2205
2008
  "bdi": {},
2206
2009
  "bdo": {},
2207
- "blockquote": {"cite": 1},
2208
- "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
2010
+ "blockquote": { "cite": 1 },
2011
+ "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 },
2209
2012
  "br": {},
2210
- "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
2211
- "canvas": {"width": 1, "height": 1},
2013
+ "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } },
2014
+ "canvas": { "width": 1, "height": 1 },
2212
2015
  "caption": {},
2213
2016
  "cite": {},
2214
2017
  "code": {},
2215
- "col": {"span": 1},
2216
- "colgroup": {"span": 1},
2217
- "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2018
+ "col": { "span": 1 },
2019
+ "colgroup": { "span": 1 },
2020
+ "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 },
2218
2021
  "data": {},
2219
2022
  "datalist": {},
2220
2023
  "dd": {},
2221
- "del": {"cite": 1, "datetime": 1},
2222
- "details": {"open": 1},
2024
+ "del": { "cite": 1, "datetime": 1 },
2025
+ "details": { "open": 1 },
2223
2026
  "dfn": {},
2224
- "dialog": {"open": 1},
2027
+ "dialog": { "open": 1 },
2225
2028
  "div": {},
2226
2029
  "dl": {},
2227
2030
  "dt": {},
2228
2031
  "em": {},
2229
- "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2230
- "fieldset": {"disabled": 1, "form": 1, "name": 1},
2032
+ "embed": { "src": 1, "height": 1, "width": 1, "type": 1 },
2033
+ "fieldset": { "disabled": 1, "form": 1, "name": 1 },
2231
2034
  "figcaption": {},
2232
2035
  "figure": {},
2233
2036
  "footer": {},
2234
- "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
2037
+ "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } },
2235
2038
  "h1": {},
2236
2039
  "h2": {},
2237
2040
  "h3": {},
@@ -2241,109 +2044,101 @@ var attributeMap = {
2241
2044
  "head": {},
2242
2045
  "header": {},
2243
2046
  "hr": {},
2244
- "html": {"manifest": 1},
2047
+ "html": { "manifest": 1 },
2245
2048
  "i": {},
2246
- "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
2247
- "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2049
+ "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } },
2050
+ "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 },
2248
2051
  "input": {
2249
- "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
2250
- "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
2251
- "ins": {"cite": 1, "datetime": 1},
2052
+ "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 },
2053
+ "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1
2054
+ },
2055
+ "ins": { "cite": 1, "datetime": 1 },
2252
2056
  "kbd": {},
2253
- "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2254
- "label": {"form": 1, "for": 1},
2057
+ "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 },
2058
+ "label": { "form": 1, "for": 1 },
2255
2059
  "legend": {},
2256
- "li": {"value": 1},
2257
- "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
2060
+ "li": { "value": 1 },
2061
+ "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 },
2258
2062
  "main": {},
2259
- "map": {"name": 1},
2063
+ "map": { "name": 1 },
2260
2064
  "mark": {},
2261
2065
  "math": {},
2262
- "menu": {"type": 1, "label": 1},
2263
- "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2264
- "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2066
+ "menu": { "type": 1, "label": 1 },
2067
+ "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 },
2068
+ "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 },
2265
2069
  "nav": {},
2266
- "noscript": {"href": 1},
2267
- "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2268
- "ol": {"start": 1, "reversed": 1},
2269
- "optgroup": {"disabled": 1, "label": 1},
2270
- "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2271
- "output": {"for": 1, "form": 1, "name": 1},
2070
+ "noscript": { "href": 1 },
2071
+ "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 },
2072
+ "ol": { "start": 1, "reversed": 1 },
2073
+ "optgroup": { "disabled": 1, "label": 1 },
2074
+ "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 },
2075
+ "output": { "for": 1, "form": 1, "name": 1 },
2272
2076
  "p": {},
2273
- "param": {"name": 1, "value": 1},
2077
+ "param": { "name": 1, "value": 1 },
2274
2078
  "pre": {},
2275
- "progress": {"value": 1, "max": 1},
2276
- "q": {"cite": 1},
2079
+ "progress": { "value": 1, "max": 1 },
2080
+ "q": { "cite": 1 },
2277
2081
  "rp": {},
2278
2082
  "rt": {},
2279
2083
  "ruby": {},
2280
2084
  "s": {},
2281
2085
  "samp": {},
2282
- "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2283
- "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2086
+ "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 },
2087
+ "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } },
2284
2088
  "small": {},
2285
- "source": {"src": 1, "type": 1, "media": 1},
2089
+ "source": { "src": 1, "type": 1, "media": 1 },
2286
2090
  "span": {},
2287
2091
  "strong": {},
2288
- "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2092
+ "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 },
2289
2093
  "sub": {},
2290
2094
  "sup": {},
2291
2095
  "svg": {},
2292
- "table": {"summary": 1},
2096
+ "table": { "summary": 1 },
2293
2097
  "tbody": {},
2294
- "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2295
- "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
2098
+ "td": { "headers": 1, "rowspan": 1, "colspan": 1 },
2099
+ "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } },
2296
2100
  "tfoot": {},
2297
- "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2101
+ "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 },
2298
2102
  "thead": {},
2299
- "time": {"datetime": 1},
2103
+ "time": { "datetime": 1 },
2300
2104
  "title": {},
2301
2105
  "tr": {},
2302
- "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2106
+ "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 },
2303
2107
  "section": {},
2304
2108
  "summary": {},
2305
2109
  "u": {},
2306
2110
  "ul": {},
2307
2111
  "var": {},
2308
- "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
2112
+ "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
2309
2113
  "wbr": {}
2310
2114
  };
2311
-
2312
2115
  var elements = Object.keys(attributeMap);
2313
-
2314
2116
  function is(token, type) {
2315
2117
  return token.type.lastIndexOf(type + ".xml") > -1;
2316
2118
  }
2317
-
2318
2119
  function findTagName(session, pos) {
2319
2120
  var iterator = new TokenIterator(session, pos.row, pos.column);
2320
2121
  var token = iterator.getCurrentToken();
2321
- while (token && !is(token, "tag-name")){
2122
+ while (token && !is(token, "tag-name")) {
2322
2123
  token = iterator.stepBackward();
2323
2124
  }
2324
2125
  if (token)
2325
2126
  return token.value;
2326
2127
  }
2327
-
2328
2128
  function findAttributeName(session, pos) {
2329
2129
  var iterator = new TokenIterator(session, pos.row, pos.column);
2330
2130
  var token = iterator.getCurrentToken();
2331
- while (token && !is(token, "attribute-name")){
2131
+ while (token && !is(token, "attribute-name")) {
2332
2132
  token = iterator.stepBackward();
2333
2133
  }
2334
2134
  if (token)
2335
2135
  return token.value;
2336
2136
  }
2337
-
2338
- var HtmlCompletions = function() {
2339
-
2137
+ var HtmlCompletions = function () {
2340
2138
  };
2341
-
2342
- (function() {
2343
-
2344
- this.getCompletions = function(state, session, pos, prefix) {
2139
+ (function () {
2140
+ this.getCompletions = function (state, session, pos, prefix) {
2345
2141
  var token = session.getTokenAt(pos.row, pos.column);
2346
-
2347
2142
  if (!token)
2348
2143
  return [];
2349
2144
  if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
@@ -2355,12 +2150,10 @@ var HtmlCompletions = function() {
2355
2150
  var line = session.getLine(pos.row).substr(0, pos.column);
2356
2151
  if (/&[a-z]*$/i.test(line))
2357
2152
  return this.getHTMLEntityCompletions(state, session, pos, prefix);
2358
-
2359
2153
  return [];
2360
2154
  };
2361
-
2362
- this.getTagCompletions = function(state, session, pos, prefix) {
2363
- return elements.map(function(element){
2155
+ this.getTagCompletions = function (state, session, pos, prefix) {
2156
+ return elements.map(function (element) {
2364
2157
  return {
2365
2158
  value: element,
2366
2159
  meta: "tag",
@@ -2368,8 +2161,7 @@ var HtmlCompletions = function() {
2368
2161
  };
2369
2162
  });
2370
2163
  };
2371
-
2372
- this.getAttributeCompletions = function(state, session, pos, prefix) {
2164
+ this.getAttributeCompletions = function (state, session, pos, prefix) {
2373
2165
  var tagName = findTagName(session, pos);
2374
2166
  if (!tagName)
2375
2167
  return [];
@@ -2377,7 +2169,7 @@ var HtmlCompletions = function() {
2377
2169
  if (tagName in attributeMap) {
2378
2170
  attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2379
2171
  }
2380
- return attributes.map(function(attribute){
2172
+ return attributes.map(function (attribute) {
2381
2173
  return {
2382
2174
  caption: attribute,
2383
2175
  snippet: attribute + '="$0"',
@@ -2386,18 +2178,16 @@ var HtmlCompletions = function() {
2386
2178
  };
2387
2179
  });
2388
2180
  };
2389
-
2390
- this.getAttributeValueCompletions = function(state, session, pos, prefix) {
2181
+ this.getAttributeValueCompletions = function (state, session, pos, prefix) {
2391
2182
  var tagName = findTagName(session, pos);
2392
2183
  var attributeName = findAttributeName(session, pos);
2393
-
2394
2184
  if (!tagName)
2395
2185
  return [];
2396
2186
  var values = [];
2397
2187
  if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2398
2188
  values = Object.keys(attributeMap[tagName][attributeName]);
2399
2189
  }
2400
- return values.map(function(value){
2190
+ return values.map(function (value) {
2401
2191
  return {
2402
2192
  caption: value,
2403
2193
  snippet: value,
@@ -2406,11 +2196,9 @@ var HtmlCompletions = function() {
2406
2196
  };
2407
2197
  });
2408
2198
  };
2409
-
2410
- this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
2199
+ this.getHTMLEntityCompletions = function (state, session, pos, prefix) {
2411
2200
  var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
2412
-
2413
- return values.map(function(value){
2201
+ return values.map(function (value) {
2414
2202
  return {
2415
2203
  caption: value,
2416
2204
  snippet: value,
@@ -2419,15 +2207,12 @@ var HtmlCompletions = function() {
2419
2207
  };
2420
2208
  });
2421
2209
  };
2422
-
2423
2210
  }).call(HtmlCompletions.prototype);
2424
-
2425
2211
  exports.HtmlCompletions = HtmlCompletions;
2426
- });
2427
2212
 
2428
- ace.define("ace/mode/html",[], function(require, exports, module) {
2429
- "use strict";
2213
+ });
2430
2214
 
2215
+ ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict";
2431
2216
  var oop = require("../lib/oop");
2432
2217
  var lang = require("../lib/lang");
2433
2218
  var TextMode = require("./text").Mode;
@@ -2440,178 +2225,149 @@ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2440
2225
  var WorkerClient = require("../worker/worker_client").WorkerClient;
2441
2226
  var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2442
2227
  var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2443
-
2444
- var Mode = function(options) {
2228
+ var Mode = function (options) {
2445
2229
  this.fragmentContext = options && options.fragmentContext;
2446
2230
  this.HighlightRules = HtmlHighlightRules;
2447
2231
  this.$behaviour = new XmlBehaviour();
2448
2232
  this.$completer = new HtmlCompletions();
2449
-
2450
2233
  this.createModeDelegates({
2451
2234
  "js-": JavaScriptMode,
2452
2235
  "css-": CssMode
2453
2236
  });
2454
-
2455
2237
  this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2456
2238
  };
2457
2239
  oop.inherits(Mode, TextMode);
2458
-
2459
- (function() {
2460
-
2461
- this.blockComment = {start: "<!--", end: "-->"};
2462
-
2240
+ (function () {
2241
+ this.blockComment = { start: "<!--", end: "-->" };
2463
2242
  this.voidElements = lang.arrayToMap(voidElements);
2464
-
2465
- this.getNextLineIndent = function(state, line, tab) {
2243
+ this.getNextLineIndent = function (state, line, tab) {
2466
2244
  return this.$getIndent(line);
2467
2245
  };
2468
-
2469
- this.checkOutdent = function(state, line, input) {
2246
+ this.checkOutdent = function (state, line, input) {
2470
2247
  return false;
2471
2248
  };
2472
-
2473
- this.getCompletions = function(state, session, pos, prefix) {
2249
+ this.getCompletions = function (state, session, pos, prefix) {
2474
2250
  return this.$completer.getCompletions(state, session, pos, prefix);
2475
2251
  };
2476
-
2477
- this.createWorker = function(session) {
2252
+ this.createWorker = function (session) {
2478
2253
  if (this.constructor != Mode)
2479
2254
  return;
2480
2255
  var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2481
2256
  worker.attachToDocument(session.getDocument());
2482
-
2483
2257
  if (this.fragmentContext)
2484
- worker.call("setOptions", [{context: this.fragmentContext}]);
2485
-
2486
- worker.on("error", function(e) {
2258
+ worker.call("setOptions", [{ context: this.fragmentContext }]);
2259
+ worker.on("error", function (e) {
2487
2260
  session.setAnnotations(e.data);
2488
2261
  });
2489
-
2490
- worker.on("terminate", function() {
2262
+ worker.on("terminate", function () {
2491
2263
  session.clearAnnotations();
2492
2264
  });
2493
-
2494
2265
  return worker;
2495
2266
  };
2496
-
2497
2267
  this.$id = "ace/mode/html";
2498
2268
  this.snippetFileId = "ace/snippets/html";
2499
2269
  }).call(Mode.prototype);
2500
-
2501
2270
  exports.Mode = Mode;
2271
+
2502
2272
  });
2503
2273
 
2504
- ace.define("ace/mode/handlebars_highlight_rules",[], function(require, exports, module) {
2274
+ ace.define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module){/* global define */
2505
2275
  "use strict";
2506
-
2507
2276
  var oop = require("../lib/oop");
2508
2277
  var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2509
-
2510
2278
  function pop2(currentState, stack) {
2511
2279
  stack.splice(0, 3);
2512
2280
  return stack.shift() || "start";
2513
2281
  }
2514
- var HandlebarsHighlightRules = function() {
2282
+ var HandlebarsHighlightRules = function () {
2515
2283
  HtmlHighlightRules.call(this);
2516
2284
  var hbs = {
2517
- regex : "(?={{)",
2518
- push : "handlebars"
2285
+ regex: "(?={{)",
2286
+ push: "handlebars"
2519
2287
  };
2520
2288
  for (var key in this.$rules) {
2521
2289
  this.$rules[key].unshift(hbs);
2522
2290
  }
2523
2291
  this.$rules.handlebars = [{
2524
- token : "comment.start",
2525
- regex : "{{!--",
2526
- push : [{
2527
- token : "comment.end",
2528
- regex : "--}}",
2529
- next : pop2
2530
- }, {
2531
- defaultToken : "comment"
2532
- }]
2533
- }, {
2534
- token : "comment.start",
2535
- regex : "{{!",
2536
- push : [{
2537
- token : "comment.end",
2538
- regex : "}}",
2539
- next : pop2
2292
+ token: "comment.start",
2293
+ regex: "{{!--",
2294
+ push: [{
2295
+ token: "comment.end",
2296
+ regex: "--}}",
2297
+ next: pop2
2298
+ }, {
2299
+ defaultToken: "comment"
2300
+ }]
2540
2301
  }, {
2541
- defaultToken : "comment"
2542
- }]
2543
- }, {
2544
- token : "support.function", // unescaped variable
2545
- regex : "{{{",
2546
- push : [{
2547
- token : "support.function",
2548
- regex : "}}}",
2549
- next : pop2
2302
+ token: "comment.start",
2303
+ regex: "{{!",
2304
+ push: [{
2305
+ token: "comment.end",
2306
+ regex: "}}",
2307
+ next: pop2
2308
+ }, {
2309
+ defaultToken: "comment"
2310
+ }]
2550
2311
  }, {
2551
- token : "variable.parameter",
2552
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
2553
- }]
2554
- }, {
2555
- token : "storage.type.start", // begin section
2556
- regex : "{{[#\\^/&]?",
2557
- push : [{
2558
- token : "storage.type.end",
2559
- regex : "}}",
2560
- next : pop2
2312
+ token: "support.function",
2313
+ regex: "{{{",
2314
+ push: [{
2315
+ token: "support.function",
2316
+ regex: "}}}",
2317
+ next: pop2
2318
+ }, {
2319
+ token: "variable.parameter",
2320
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*"
2321
+ }]
2561
2322
  }, {
2562
- token : "variable.parameter",
2563
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
2564
- }]
2565
- }];
2566
-
2323
+ token: "storage.type.start",
2324
+ regex: "{{[#\\^/&]?",
2325
+ push: [{
2326
+ token: "storage.type.end",
2327
+ regex: "}}",
2328
+ next: pop2
2329
+ }, {
2330
+ token: "variable.parameter",
2331
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*"
2332
+ }]
2333
+ }];
2567
2334
  this.normalizeRules();
2568
2335
  };
2569
-
2570
2336
  oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules);
2571
-
2572
2337
  exports.HandlebarsHighlightRules = HandlebarsHighlightRules;
2573
- });
2574
2338
 
2575
- ace.define("ace/mode/behaviour/html",[], function(require, exports, module) {
2576
- "use strict";
2339
+ });
2577
2340
 
2341
+ ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
2578
2342
  var oop = require("../../lib/oop");
2579
2343
  var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
2580
-
2581
2344
  var HtmlBehaviour = function () {
2582
-
2583
2345
  XmlBehaviour.call(this);
2584
-
2585
2346
  };
2586
-
2587
2347
  oop.inherits(HtmlBehaviour, XmlBehaviour);
2588
-
2589
2348
  exports.HtmlBehaviour = HtmlBehaviour;
2590
- });
2591
2349
 
2592
- ace.define("ace/mode/handlebars",[], function(require, exports, module) {
2593
- "use strict";
2350
+ });
2594
2351
 
2352
+ ace.define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"], function(require, exports, module){/* global define */
2353
+ "use strict";
2595
2354
  var oop = require("../lib/oop");
2596
2355
  var HtmlMode = require("./html").Mode;
2597
2356
  var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules;
2598
2357
  var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
2599
2358
  var HtmlFoldMode = require("./folding/html").FoldMode;
2600
-
2601
- var Mode = function() {
2359
+ var Mode = function () {
2602
2360
  HtmlMode.call(this);
2603
2361
  this.HighlightRules = HandlebarsHighlightRules;
2604
2362
  this.$behaviour = new HtmlBehaviour();
2605
2363
  };
2606
-
2607
2364
  oop.inherits(Mode, HtmlMode);
2608
-
2609
- (function() {
2610
- this.blockComment = {start: "{{!--", end: "--}}"};
2365
+ (function () {
2366
+ this.blockComment = { start: "{{!--", end: "--}}" };
2611
2367
  this.$id = "ace/mode/handlebars";
2612
2368
  }).call(Mode.prototype);
2613
-
2614
2369
  exports.Mode = Mode;
2370
+
2615
2371
  }); (function() {
2616
2372
  ace.require(["ace/mode/handlebars"], function(m) {
2617
2373
  if (typeof module == "object" && typeof exports == "object" && module) {