decko 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +36 -12
- data/lib/decko/generators/decko/decko_generator.rb +38 -35
- data/lib/decko/generators/decko/templates/spec/javascripts/support/deck_jasmine.yml +1 -1
- data/lib/decko/tasks/decko.rake +15 -4
- metadata +4 -141
- data/rails/assets/ace/ext-searchbox.js +0 -409
- data/rails/assets/ace/mode-coffee.js +0 -1
- data/rails/assets/ace/mode-css.js +0 -1
- data/rails/assets/ace/mode-html.js +0 -1
- data/rails/assets/ace/mode-javascript.js +0 -1
- data/rails/assets/ace/mode-json.js +0 -1
- data/rails/assets/ace/mode-latex.js +0 -1
- data/rails/assets/ace/mode-scss.js +0 -922
- data/rails/assets/ace/theme-github.js +0 -98
- data/rails/assets/ace/theme-textmate.js +0 -1
- data/rails/assets/ace/worker-coffee.js +0 -1
- data/rails/assets/ace/worker-css.js +0 -1
- data/rails/assets/ace/worker-html.js +0 -1
- data/rails/assets/ace/worker-javascript.js +0 -1
- data/rails/assets/ace/worker-json.js +0 -1
- data/rails/assets/body-bg-660b752b44b87594071f3d0851ac5360.png +0 -0
- data/rails/assets/body-bg-d031f29b6ba7399a6862382c3552f44c.bmp +0 -0
- data/rails/assets/body-bg.bmp +0 -0
- data/rails/assets/body-bg.png +0 -0
- data/rails/assets/external_link-b15ab5051b4ec6f32892ed80019405b5.png +0 -0
- data/rails/assets/fonts/FontAwesome.otf +0 -0
- data/rails/assets/fonts/MaterialIcons-Regular.eot +0 -0
- data/rails/assets/fonts/MaterialIcons-Regular.ijmap +0 -1
- data/rails/assets/fonts/MaterialIcons-Regular.svg +0 -2373
- data/rails/assets/fonts/MaterialIcons-Regular.ttf +0 -0
- data/rails/assets/fonts/MaterialIcons-Regular.woff +0 -0
- data/rails/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
- data/rails/assets/fonts/fontawesome-webfont.eot +0 -0
- data/rails/assets/fonts/fontawesome-webfont.svg +0 -2671
- data/rails/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/rails/assets/fonts/fontawesome-webfont.woff +0 -0
- data/rails/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/rails/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/rails/assets/fonts/glyphicons-halflings-regular.svg +0 -288
- data/rails/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/rails/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/rails/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-icons_222222_256x240.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-icons_454545_256x240.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-icons_888888_256x240.png +0 -0
- data/rails/assets/jquery-ui-smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/rails/assets/jquery.min-388372ef65cc311f6a3df4a6ceac8d22.map +0 -1
- data/rails/assets/manifest.yml +0 -617
- data/rails/assets/tinymce/jquery.tinymce.min.js +0 -1
- data/rails/assets/tinymce/langs/readme.md +0 -3
- data/rails/assets/tinymce/license.txt +0 -504
- data/rails/assets/tinymce/plugins/advlist/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/anchor/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/autolink/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/autoresize/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/autosave/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/bbcode/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/charmap/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/code/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/codesample/css/prism.css +0 -138
- data/rails/assets/tinymce/plugins/codesample/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/colorpicker/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/contextmenu/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/directionality/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/rails/assets/tinymce/plugins/emoticons/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/fullpage/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/fullscreen/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/help/img/logo.png +0 -0
- data/rails/assets/tinymce/plugins/help/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/hr/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/image/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/imagetools/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/importcss/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/insertdatetime/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/legacyoutput/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/link/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/lists/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/media/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/nonbreaking/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/noneditable/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/pagebreak/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/paste/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/preview/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/print/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/save/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/searchreplace/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/spellchecker/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/tabfocus/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/table/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/template/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/textcolor/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/textpattern/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/toc/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/visualblocks/css/visualblocks.css +0 -154
- data/rails/assets/tinymce/plugins/visualblocks/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/visualchars/plugin.min.js +0 -1
- data/rails/assets/tinymce/plugins/wordcount/plugin.min.js +0 -1
- data/rails/assets/tinymce/skins/lightgray/content.inline.min.css +0 -1
- data/rails/assets/tinymce/skins/lightgray/content.min.css +0 -1
- data/rails/assets/tinymce/skins/lightgray/content.mobile.min.css +0 -1
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -63
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce.svg +0 -131
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/rails/assets/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/rails/assets/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/rails/assets/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/rails/assets/tinymce/skins/lightgray/img/object.gif +0 -0
- data/rails/assets/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/rails/assets/tinymce/skins/lightgray/skin.min.css +0 -1
- data/rails/assets/tinymce/skins/lightgray/skin.mobile.min.css +0 -2
- data/rails/assets/tinymce/themes/inlite/theme.min.js +0 -1
- data/rails/assets/tinymce/themes/mobile/theme.min.js +0 -1
- data/rails/assets/tinymce/themes/modern/theme.min.js +0 -1
- data/rails/assets/tinymce/tinymce.min.js +0 -2
@@ -1,922 +0,0 @@
|
|
1
|
-
define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
2
|
-
"use strict";
|
3
|
-
|
4
|
-
var oop = require("../lib/oop");
|
5
|
-
var lang = require("../lib/lang");
|
6
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
7
|
-
|
8
|
-
var ScssHighlightRules = function() {
|
9
|
-
|
10
|
-
var properties = lang.arrayToMap( (function () {
|
11
|
-
|
12
|
-
var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
|
13
|
-
|
14
|
-
var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
|
15
|
-
"background-size|binding|border-bottom-colors|border-left-colors|" +
|
16
|
-
"border-right-colors|border-top-colors|border-end|border-end-color|" +
|
17
|
-
"border-end-style|border-end-width|border-image|border-start|" +
|
18
|
-
"border-start-color|border-start-style|border-start-width|box-align|" +
|
19
|
-
"box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
|
20
|
-
"box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
|
21
|
-
"column-rule-width|column-rule-style|column-rule-color|float-edge|" +
|
22
|
-
"font-feature-settings|font-language-override|force-broken-image-icon|" +
|
23
|
-
"image-region|margin-end|margin-start|opacity|outline|outline-color|" +
|
24
|
-
"outline-offset|outline-radius|outline-radius-bottomleft|" +
|
25
|
-
"outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
|
26
|
-
"outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
|
27
|
-
"tab-size|text-blink|text-decoration-color|text-decoration-line|" +
|
28
|
-
"text-decoration-style|transform|transform-origin|transition|" +
|
29
|
-
"transition-delay|transition-duration|transition-property|" +
|
30
|
-
"transition-timing-function|user-focus|user-input|user-modify|user-select|" +
|
31
|
-
"window-shadow|border-radius").split("|");
|
32
|
-
|
33
|
-
var properties = ("azimuth|background-attachment|background-color|background-image|" +
|
34
|
-
"background-position|background-repeat|background|border-bottom-color|" +
|
35
|
-
"border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
|
36
|
-
"border-color|border-left-color|border-left-style|border-left-width|" +
|
37
|
-
"border-left|border-right-color|border-right-style|border-right-width|" +
|
38
|
-
"border-right|border-spacing|border-style|border-top-color|" +
|
39
|
-
"border-top-style|border-top-width|border-top|border-width|border|bottom|" +
|
40
|
-
"box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
|
41
|
-
"counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
|
42
|
-
"elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
|
43
|
-
"font-stretch|font-style|font-variant|font-weight|font|height|left|" +
|
44
|
-
"letter-spacing|line-height|list-style-image|list-style-position|" +
|
45
|
-
"list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
|
46
|
-
"margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
|
47
|
-
"min-width|opacity|orphans|outline-color|" +
|
48
|
-
"outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
|
49
|
-
"padding-left|padding-right|padding-top|padding|page-break-after|" +
|
50
|
-
"page-break-before|page-break-inside|page|pause-after|pause-before|" +
|
51
|
-
"pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
|
52
|
-
"size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
|
53
|
-
"stress|table-layout|text-align|text-decoration|text-indent|" +
|
54
|
-
"text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
|
55
|
-
"visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
|
56
|
-
"z-index").split("|");
|
57
|
-
var ret = [];
|
58
|
-
for (var i=0, ln=browserPrefix.length; i<ln; i++) {
|
59
|
-
Array.prototype.push.apply(
|
60
|
-
ret,
|
61
|
-
(( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
|
62
|
-
);
|
63
|
-
}
|
64
|
-
Array.prototype.push.apply(ret, prefixProperties);
|
65
|
-
Array.prototype.push.apply(ret, properties);
|
66
|
-
|
67
|
-
return ret;
|
68
|
-
|
69
|
-
})() );
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
var functions = lang.arrayToMap(
|
74
|
-
("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
|
75
|
-
"alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
|
76
|
-
"floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
|
77
|
-
"nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
|
78
|
-
"scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
|
79
|
-
);
|
80
|
-
|
81
|
-
var constants = lang.arrayToMap(
|
82
|
-
("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
|
83
|
-
"block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
|
84
|
-
"char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
|
85
|
-
"decimal-leading-zero|decimal|default|disabled|disc|" +
|
86
|
-
"distribute-all-lines|distribute-letter|distribute-space|" +
|
87
|
-
"distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
|
88
|
-
"hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
|
89
|
-
"ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
|
90
|
-
"ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
|
91
|
-
"inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
|
92
|
-
"keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
|
93
|
-
"lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
|
94
|
-
"medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
|
95
|
-
"nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
|
96
|
-
"overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
|
97
|
-
"ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
|
98
|
-
"solid|square|static|strict|super|sw-resize|table-footer-group|" +
|
99
|
-
"table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
|
100
|
-
"transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
|
101
|
-
"vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
|
102
|
-
"zero").split("|")
|
103
|
-
);
|
104
|
-
|
105
|
-
var colors = lang.arrayToMap(
|
106
|
-
("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
|
107
|
-
"purple|red|silver|teal|white|yellow").split("|")
|
108
|
-
);
|
109
|
-
|
110
|
-
var keywords = lang.arrayToMap(
|
111
|
-
("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
|
112
|
-
)
|
113
|
-
|
114
|
-
var tags = lang.arrayToMap(
|
115
|
-
("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
|
116
|
-
"big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
|
117
|
-
"command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
|
118
|
-
"figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
|
119
|
-
"header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
|
120
|
-
"link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
|
121
|
-
"option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
|
122
|
-
"small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
|
123
|
-
"textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
|
124
|
-
);
|
125
|
-
|
126
|
-
var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
127
|
-
|
128
|
-
this.$rules = {
|
129
|
-
"start" : [
|
130
|
-
{
|
131
|
-
token : "comment",
|
132
|
-
regex : "\\/\\/.*$"
|
133
|
-
},
|
134
|
-
{
|
135
|
-
token : "comment", // multi line comment
|
136
|
-
regex : "\\/\\*",
|
137
|
-
next : "comment"
|
138
|
-
}, {
|
139
|
-
token : "string", // single line
|
140
|
-
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
141
|
-
}, {
|
142
|
-
token : "string", // multi line string start
|
143
|
-
regex : '["].*\\\\$',
|
144
|
-
next : "qqstring"
|
145
|
-
}, {
|
146
|
-
token : "string", // single line
|
147
|
-
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
148
|
-
}, {
|
149
|
-
token : "string", // multi line string start
|
150
|
-
regex : "['].*\\\\$",
|
151
|
-
next : "qstring"
|
152
|
-
}, {
|
153
|
-
token : "constant.numeric",
|
154
|
-
regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
|
155
|
-
}, {
|
156
|
-
token : "constant.numeric", // hex6 color
|
157
|
-
regex : "#[a-f0-9]{6}"
|
158
|
-
}, {
|
159
|
-
token : "constant.numeric", // hex3 color
|
160
|
-
regex : "#[a-f0-9]{3}"
|
161
|
-
}, {
|
162
|
-
token : "constant.numeric",
|
163
|
-
regex : numRe
|
164
|
-
}, {
|
165
|
-
token : ["support.function", "string", "support.function"],
|
166
|
-
regex : "(url\\()(.*)(\\))"
|
167
|
-
}, {
|
168
|
-
token : function(value) {
|
169
|
-
if (properties.hasOwnProperty(value.toLowerCase()))
|
170
|
-
return "support.type";
|
171
|
-
if (keywords.hasOwnProperty(value))
|
172
|
-
return "keyword";
|
173
|
-
else if (constants.hasOwnProperty(value))
|
174
|
-
return "constant.language";
|
175
|
-
else if (functions.hasOwnProperty(value))
|
176
|
-
return "support.function";
|
177
|
-
else if (colors.hasOwnProperty(value.toLowerCase()))
|
178
|
-
return "support.constant.color";
|
179
|
-
else if (tags.hasOwnProperty(value.toLowerCase()))
|
180
|
-
return "variable.language";
|
181
|
-
else
|
182
|
-
return "text";
|
183
|
-
},
|
184
|
-
regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
|
185
|
-
}, {
|
186
|
-
token : "variable",
|
187
|
-
regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
|
188
|
-
}, {
|
189
|
-
token: "variable.language",
|
190
|
-
regex: "#[a-z0-9-_]+"
|
191
|
-
}, {
|
192
|
-
token: "variable.language",
|
193
|
-
regex: "\\.[a-z0-9-_]+"
|
194
|
-
}, {
|
195
|
-
token: "variable.language",
|
196
|
-
regex: ":[a-z0-9-_]+"
|
197
|
-
}, {
|
198
|
-
token: "constant",
|
199
|
-
regex: "[a-z0-9-_]+"
|
200
|
-
}, {
|
201
|
-
token : "keyword.operator",
|
202
|
-
regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
|
203
|
-
}, {
|
204
|
-
token : "paren.lparen",
|
205
|
-
regex : "[[({]"
|
206
|
-
}, {
|
207
|
-
token : "paren.rparen",
|
208
|
-
regex : "[\\])}]"
|
209
|
-
}, {
|
210
|
-
token : "text",
|
211
|
-
regex : "\\s+"
|
212
|
-
}, {
|
213
|
-
caseInsensitive: true
|
214
|
-
}
|
215
|
-
],
|
216
|
-
"comment" : [
|
217
|
-
{
|
218
|
-
token : "comment", // closing comment
|
219
|
-
regex : ".*?\\*\\/",
|
220
|
-
next : "start"
|
221
|
-
}, {
|
222
|
-
token : "comment", // comment spanning whole line
|
223
|
-
regex : ".+"
|
224
|
-
}
|
225
|
-
],
|
226
|
-
"qqstring" : [
|
227
|
-
{
|
228
|
-
token : "string",
|
229
|
-
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
|
230
|
-
next : "start"
|
231
|
-
}, {
|
232
|
-
token : "string",
|
233
|
-
regex : '.+'
|
234
|
-
}
|
235
|
-
],
|
236
|
-
"qstring" : [
|
237
|
-
{
|
238
|
-
token : "string",
|
239
|
-
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
|
240
|
-
next : "start"
|
241
|
-
}, {
|
242
|
-
token : "string",
|
243
|
-
regex : '.+'
|
244
|
-
}
|
245
|
-
]
|
246
|
-
};
|
247
|
-
};
|
248
|
-
|
249
|
-
oop.inherits(ScssHighlightRules, TextHighlightRules);
|
250
|
-
|
251
|
-
exports.ScssHighlightRules = ScssHighlightRules;
|
252
|
-
|
253
|
-
});
|
254
|
-
|
255
|
-
define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
|
256
|
-
"use strict";
|
257
|
-
|
258
|
-
var Range = require("../range").Range;
|
259
|
-
|
260
|
-
var MatchingBraceOutdent = function() {};
|
261
|
-
|
262
|
-
(function() {
|
263
|
-
|
264
|
-
this.checkOutdent = function(line, input) {
|
265
|
-
if (! /^\s+$/.test(line))
|
266
|
-
return false;
|
267
|
-
|
268
|
-
return /^\s*\}/.test(input);
|
269
|
-
};
|
270
|
-
|
271
|
-
this.autoOutdent = function(doc, row) {
|
272
|
-
var line = doc.getLine(row);
|
273
|
-
var match = line.match(/^(\s*\})/);
|
274
|
-
|
275
|
-
if (!match) return 0;
|
276
|
-
|
277
|
-
var column = match[1].length;
|
278
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
279
|
-
|
280
|
-
if (!openBracePos || openBracePos.row == row) return 0;
|
281
|
-
|
282
|
-
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
283
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
284
|
-
};
|
285
|
-
|
286
|
-
this.$getIndent = function(line) {
|
287
|
-
return line.match(/^\s*/)[0];
|
288
|
-
};
|
289
|
-
|
290
|
-
}).call(MatchingBraceOutdent.prototype);
|
291
|
-
|
292
|
-
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
293
|
-
});
|
294
|
-
|
295
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
296
|
-
"use strict";
|
297
|
-
|
298
|
-
var oop = require("../../lib/oop");
|
299
|
-
var Behaviour = require("../behaviour").Behaviour;
|
300
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
301
|
-
var lang = require("../../lib/lang");
|
302
|
-
|
303
|
-
var SAFE_INSERT_IN_TOKENS =
|
304
|
-
["text", "paren.rparen", "punctuation.operator"];
|
305
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
306
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
307
|
-
|
308
|
-
var context;
|
309
|
-
var contextCache = {};
|
310
|
-
var initContext = function(editor) {
|
311
|
-
var id = -1;
|
312
|
-
if (editor.multiSelect) {
|
313
|
-
id = editor.selection.index;
|
314
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
315
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
316
|
-
}
|
317
|
-
if (contextCache[id])
|
318
|
-
return context = contextCache[id];
|
319
|
-
context = contextCache[id] = {
|
320
|
-
autoInsertedBrackets: 0,
|
321
|
-
autoInsertedRow: -1,
|
322
|
-
autoInsertedLineEnd: "",
|
323
|
-
maybeInsertedBrackets: 0,
|
324
|
-
maybeInsertedRow: -1,
|
325
|
-
maybeInsertedLineStart: "",
|
326
|
-
maybeInsertedLineEnd: ""
|
327
|
-
};
|
328
|
-
};
|
329
|
-
|
330
|
-
var CstyleBehaviour = function() {
|
331
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
332
|
-
var cursor = editor.getCursorPosition();
|
333
|
-
var line = session.doc.getLine(cursor.row);
|
334
|
-
if (text == '{') {
|
335
|
-
initContext(editor);
|
336
|
-
var selection = editor.getSelectionRange();
|
337
|
-
var selected = session.doc.getTextRange(selection);
|
338
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
339
|
-
return {
|
340
|
-
text: '{' + selected + '}',
|
341
|
-
selection: false
|
342
|
-
};
|
343
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
344
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
345
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
346
|
-
return {
|
347
|
-
text: '{}',
|
348
|
-
selection: [1, 1]
|
349
|
-
};
|
350
|
-
} else {
|
351
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
352
|
-
return {
|
353
|
-
text: '{',
|
354
|
-
selection: [1, 1]
|
355
|
-
};
|
356
|
-
}
|
357
|
-
}
|
358
|
-
} else if (text == '}') {
|
359
|
-
initContext(editor);
|
360
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
361
|
-
if (rightChar == '}') {
|
362
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
363
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
364
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
365
|
-
return {
|
366
|
-
text: '',
|
367
|
-
selection: [1, 1]
|
368
|
-
};
|
369
|
-
}
|
370
|
-
}
|
371
|
-
} else if (text == "\n" || text == "\r\n") {
|
372
|
-
initContext(editor);
|
373
|
-
var closing = "";
|
374
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
375
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
376
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
377
|
-
}
|
378
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
379
|
-
if (rightChar === '}') {
|
380
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
381
|
-
if (!openBracePos)
|
382
|
-
return null;
|
383
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
384
|
-
} else if (closing) {
|
385
|
-
var next_indent = this.$getIndent(line);
|
386
|
-
} else {
|
387
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
388
|
-
return;
|
389
|
-
}
|
390
|
-
var indent = next_indent + session.getTabString();
|
391
|
-
|
392
|
-
return {
|
393
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
394
|
-
selection: [1, indent.length, 1, indent.length]
|
395
|
-
};
|
396
|
-
} else {
|
397
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
398
|
-
}
|
399
|
-
});
|
400
|
-
|
401
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
402
|
-
var selected = session.doc.getTextRange(range);
|
403
|
-
if (!range.isMultiLine() && selected == '{') {
|
404
|
-
initContext(editor);
|
405
|
-
var line = session.doc.getLine(range.start.row);
|
406
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
407
|
-
if (rightChar == '}') {
|
408
|
-
range.end.column++;
|
409
|
-
return range;
|
410
|
-
} else {
|
411
|
-
context.maybeInsertedBrackets--;
|
412
|
-
}
|
413
|
-
}
|
414
|
-
});
|
415
|
-
|
416
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
417
|
-
if (text == '(') {
|
418
|
-
initContext(editor);
|
419
|
-
var selection = editor.getSelectionRange();
|
420
|
-
var selected = session.doc.getTextRange(selection);
|
421
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
422
|
-
return {
|
423
|
-
text: '(' + selected + ')',
|
424
|
-
selection: false
|
425
|
-
};
|
426
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
427
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
428
|
-
return {
|
429
|
-
text: '()',
|
430
|
-
selection: [1, 1]
|
431
|
-
};
|
432
|
-
}
|
433
|
-
} else if (text == ')') {
|
434
|
-
initContext(editor);
|
435
|
-
var cursor = editor.getCursorPosition();
|
436
|
-
var line = session.doc.getLine(cursor.row);
|
437
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
438
|
-
if (rightChar == ')') {
|
439
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
440
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
441
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
442
|
-
return {
|
443
|
-
text: '',
|
444
|
-
selection: [1, 1]
|
445
|
-
};
|
446
|
-
}
|
447
|
-
}
|
448
|
-
}
|
449
|
-
});
|
450
|
-
|
451
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
452
|
-
var selected = session.doc.getTextRange(range);
|
453
|
-
if (!range.isMultiLine() && selected == '(') {
|
454
|
-
initContext(editor);
|
455
|
-
var line = session.doc.getLine(range.start.row);
|
456
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
457
|
-
if (rightChar == ')') {
|
458
|
-
range.end.column++;
|
459
|
-
return range;
|
460
|
-
}
|
461
|
-
}
|
462
|
-
});
|
463
|
-
|
464
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
465
|
-
if (text == '[') {
|
466
|
-
initContext(editor);
|
467
|
-
var selection = editor.getSelectionRange();
|
468
|
-
var selected = session.doc.getTextRange(selection);
|
469
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
470
|
-
return {
|
471
|
-
text: '[' + selected + ']',
|
472
|
-
selection: false
|
473
|
-
};
|
474
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
475
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
476
|
-
return {
|
477
|
-
text: '[]',
|
478
|
-
selection: [1, 1]
|
479
|
-
};
|
480
|
-
}
|
481
|
-
} else if (text == ']') {
|
482
|
-
initContext(editor);
|
483
|
-
var cursor = editor.getCursorPosition();
|
484
|
-
var line = session.doc.getLine(cursor.row);
|
485
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
486
|
-
if (rightChar == ']') {
|
487
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
488
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
489
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
490
|
-
return {
|
491
|
-
text: '',
|
492
|
-
selection: [1, 1]
|
493
|
-
};
|
494
|
-
}
|
495
|
-
}
|
496
|
-
}
|
497
|
-
});
|
498
|
-
|
499
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
500
|
-
var selected = session.doc.getTextRange(range);
|
501
|
-
if (!range.isMultiLine() && selected == '[') {
|
502
|
-
initContext(editor);
|
503
|
-
var line = session.doc.getLine(range.start.row);
|
504
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
505
|
-
if (rightChar == ']') {
|
506
|
-
range.end.column++;
|
507
|
-
return range;
|
508
|
-
}
|
509
|
-
}
|
510
|
-
});
|
511
|
-
|
512
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
513
|
-
if (text == '"' || text == "'") {
|
514
|
-
initContext(editor);
|
515
|
-
var quote = text;
|
516
|
-
var selection = editor.getSelectionRange();
|
517
|
-
var selected = session.doc.getTextRange(selection);
|
518
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
519
|
-
return {
|
520
|
-
text: quote + selected + quote,
|
521
|
-
selection: false
|
522
|
-
};
|
523
|
-
} else {
|
524
|
-
var cursor = editor.getCursorPosition();
|
525
|
-
var line = session.doc.getLine(cursor.row);
|
526
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
527
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
528
|
-
|
529
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
530
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
531
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
532
|
-
return null;
|
533
|
-
|
534
|
-
var stringBefore = token && /string/.test(token.type);
|
535
|
-
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
536
|
-
|
537
|
-
var pair;
|
538
|
-
if (rightChar == quote) {
|
539
|
-
pair = stringBefore !== stringAfter;
|
540
|
-
} else {
|
541
|
-
if (stringBefore && !stringAfter)
|
542
|
-
return null; // wrap string with different quote
|
543
|
-
if (stringBefore && stringAfter)
|
544
|
-
return null; // do not pair quotes inside strings
|
545
|
-
var wordRe = session.$mode.tokenRe;
|
546
|
-
wordRe.lastIndex = 0;
|
547
|
-
var isWordBefore = wordRe.test(leftChar);
|
548
|
-
wordRe.lastIndex = 0;
|
549
|
-
var isWordAfter = wordRe.test(leftChar);
|
550
|
-
if (isWordBefore || isWordAfter)
|
551
|
-
return null; // before or after alphanumeric
|
552
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
553
|
-
return null; // there is rightChar and it isn't closing
|
554
|
-
pair = true;
|
555
|
-
}
|
556
|
-
return {
|
557
|
-
text: pair ? quote + quote : "",
|
558
|
-
selection: [1,1]
|
559
|
-
};
|
560
|
-
}
|
561
|
-
}
|
562
|
-
});
|
563
|
-
|
564
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
565
|
-
var selected = session.doc.getTextRange(range);
|
566
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
567
|
-
initContext(editor);
|
568
|
-
var line = session.doc.getLine(range.start.row);
|
569
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
570
|
-
if (rightChar == selected) {
|
571
|
-
range.end.column++;
|
572
|
-
return range;
|
573
|
-
}
|
574
|
-
}
|
575
|
-
});
|
576
|
-
|
577
|
-
};
|
578
|
-
|
579
|
-
|
580
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
581
|
-
var cursor = editor.getCursorPosition();
|
582
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
583
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
584
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
585
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
586
|
-
return false;
|
587
|
-
}
|
588
|
-
iterator.stepForward();
|
589
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
590
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
591
|
-
};
|
592
|
-
|
593
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
594
|
-
return types.indexOf(token.type || token) > -1;
|
595
|
-
};
|
596
|
-
|
597
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
598
|
-
var cursor = editor.getCursorPosition();
|
599
|
-
var line = session.doc.getLine(cursor.row);
|
600
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
601
|
-
context.autoInsertedBrackets = 0;
|
602
|
-
context.autoInsertedRow = cursor.row;
|
603
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
604
|
-
context.autoInsertedBrackets++;
|
605
|
-
};
|
606
|
-
|
607
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
608
|
-
var cursor = editor.getCursorPosition();
|
609
|
-
var line = session.doc.getLine(cursor.row);
|
610
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
611
|
-
context.maybeInsertedBrackets = 0;
|
612
|
-
context.maybeInsertedRow = cursor.row;
|
613
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
614
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
615
|
-
context.maybeInsertedBrackets++;
|
616
|
-
};
|
617
|
-
|
618
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
619
|
-
return context.autoInsertedBrackets > 0 &&
|
620
|
-
cursor.row === context.autoInsertedRow &&
|
621
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
622
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
623
|
-
};
|
624
|
-
|
625
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
626
|
-
return context.maybeInsertedBrackets > 0 &&
|
627
|
-
cursor.row === context.maybeInsertedRow &&
|
628
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
629
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
630
|
-
};
|
631
|
-
|
632
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
633
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
634
|
-
context.autoInsertedBrackets--;
|
635
|
-
};
|
636
|
-
|
637
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
638
|
-
if (context) {
|
639
|
-
context.maybeInsertedBrackets = 0;
|
640
|
-
context.maybeInsertedRow = -1;
|
641
|
-
}
|
642
|
-
};
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
647
|
-
|
648
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
649
|
-
});
|
650
|
-
|
651
|
-
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) {
|
652
|
-
"use strict";
|
653
|
-
|
654
|
-
var oop = require("../../lib/oop");
|
655
|
-
var Behaviour = require("../behaviour").Behaviour;
|
656
|
-
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
657
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
658
|
-
|
659
|
-
var CssBehaviour = function () {
|
660
|
-
|
661
|
-
this.inherit(CstyleBehaviour);
|
662
|
-
|
663
|
-
this.add("colon", "insertion", function (state, action, editor, session, text) {
|
664
|
-
if (text === ':') {
|
665
|
-
var cursor = editor.getCursorPosition();
|
666
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
667
|
-
var token = iterator.getCurrentToken();
|
668
|
-
if (token && token.value.match(/\s+/)) {
|
669
|
-
token = iterator.stepBackward();
|
670
|
-
}
|
671
|
-
if (token && token.type === 'support.type') {
|
672
|
-
var line = session.doc.getLine(cursor.row);
|
673
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
674
|
-
if (rightChar === ':') {
|
675
|
-
return {
|
676
|
-
text: '',
|
677
|
-
selection: [1, 1]
|
678
|
-
}
|
679
|
-
}
|
680
|
-
if (!line.substring(cursor.column).match(/^\s*;/)) {
|
681
|
-
return {
|
682
|
-
text: ':;',
|
683
|
-
selection: [1, 1]
|
684
|
-
}
|
685
|
-
}
|
686
|
-
}
|
687
|
-
}
|
688
|
-
});
|
689
|
-
|
690
|
-
this.add("colon", "deletion", function (state, action, editor, session, range) {
|
691
|
-
var selected = session.doc.getTextRange(range);
|
692
|
-
if (!range.isMultiLine() && selected === ':') {
|
693
|
-
var cursor = editor.getCursorPosition();
|
694
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
695
|
-
var token = iterator.getCurrentToken();
|
696
|
-
if (token && token.value.match(/\s+/)) {
|
697
|
-
token = iterator.stepBackward();
|
698
|
-
}
|
699
|
-
if (token && token.type === 'support.type') {
|
700
|
-
var line = session.doc.getLine(range.start.row);
|
701
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
702
|
-
if (rightChar === ';') {
|
703
|
-
range.end.column ++;
|
704
|
-
return range;
|
705
|
-
}
|
706
|
-
}
|
707
|
-
}
|
708
|
-
});
|
709
|
-
|
710
|
-
this.add("semicolon", "insertion", function (state, action, editor, session, text) {
|
711
|
-
if (text === ';') {
|
712
|
-
var cursor = editor.getCursorPosition();
|
713
|
-
var line = session.doc.getLine(cursor.row);
|
714
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
715
|
-
if (rightChar === ';') {
|
716
|
-
return {
|
717
|
-
text: '',
|
718
|
-
selection: [1, 1]
|
719
|
-
}
|
720
|
-
}
|
721
|
-
}
|
722
|
-
});
|
723
|
-
|
724
|
-
}
|
725
|
-
oop.inherits(CssBehaviour, CstyleBehaviour);
|
726
|
-
|
727
|
-
exports.CssBehaviour = CssBehaviour;
|
728
|
-
});
|
729
|
-
|
730
|
-
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
731
|
-
"use strict";
|
732
|
-
|
733
|
-
var oop = require("../../lib/oop");
|
734
|
-
var Range = require("../../range").Range;
|
735
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
736
|
-
|
737
|
-
var FoldMode = exports.FoldMode = function(commentRegex) {
|
738
|
-
if (commentRegex) {
|
739
|
-
this.foldingStartMarker = new RegExp(
|
740
|
-
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
741
|
-
);
|
742
|
-
this.foldingStopMarker = new RegExp(
|
743
|
-
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
744
|
-
);
|
745
|
-
}
|
746
|
-
};
|
747
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
748
|
-
|
749
|
-
(function() {
|
750
|
-
|
751
|
-
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
752
|
-
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
753
|
-
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
754
|
-
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
755
|
-
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
|
756
|
-
this._getFoldWidgetBase = this.getFoldWidget;
|
757
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
758
|
-
var line = session.getLine(row);
|
759
|
-
|
760
|
-
if (this.singleLineBlockCommentRe.test(line)) {
|
761
|
-
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
762
|
-
return "";
|
763
|
-
}
|
764
|
-
|
765
|
-
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
766
|
-
|
767
|
-
if (!fw && this.startRegionRe.test(line))
|
768
|
-
return "start"; // lineCommentRegionStart
|
769
|
-
|
770
|
-
return fw;
|
771
|
-
};
|
772
|
-
|
773
|
-
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
774
|
-
var line = session.getLine(row);
|
775
|
-
|
776
|
-
if (this.startRegionRe.test(line))
|
777
|
-
return this.getCommentRegionBlock(session, line, row);
|
778
|
-
|
779
|
-
var match = line.match(this.foldingStartMarker);
|
780
|
-
if (match) {
|
781
|
-
var i = match.index;
|
782
|
-
|
783
|
-
if (match[1])
|
784
|
-
return this.openingBracketBlock(session, match[1], row, i);
|
785
|
-
|
786
|
-
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
787
|
-
|
788
|
-
if (range && !range.isMultiLine()) {
|
789
|
-
if (forceMultiline) {
|
790
|
-
range = this.getSectionRange(session, row);
|
791
|
-
} else if (foldStyle != "all")
|
792
|
-
range = null;
|
793
|
-
}
|
794
|
-
|
795
|
-
return range;
|
796
|
-
}
|
797
|
-
|
798
|
-
if (foldStyle === "markbegin")
|
799
|
-
return;
|
800
|
-
|
801
|
-
var match = line.match(this.foldingStopMarker);
|
802
|
-
if (match) {
|
803
|
-
var i = match.index + match[0].length;
|
804
|
-
|
805
|
-
if (match[1])
|
806
|
-
return this.closingBracketBlock(session, match[1], row, i);
|
807
|
-
|
808
|
-
return session.getCommentFoldRange(row, i, -1);
|
809
|
-
}
|
810
|
-
};
|
811
|
-
|
812
|
-
this.getSectionRange = function(session, row) {
|
813
|
-
var line = session.getLine(row);
|
814
|
-
var startIndent = line.search(/\S/);
|
815
|
-
var startRow = row;
|
816
|
-
var startColumn = line.length;
|
817
|
-
row = row + 1;
|
818
|
-
var endRow = row;
|
819
|
-
var maxRow = session.getLength();
|
820
|
-
while (++row < maxRow) {
|
821
|
-
line = session.getLine(row);
|
822
|
-
var indent = line.search(/\S/);
|
823
|
-
if (indent === -1)
|
824
|
-
continue;
|
825
|
-
if (startIndent > indent)
|
826
|
-
break;
|
827
|
-
var subRange = this.getFoldWidgetRange(session, "all", row);
|
828
|
-
|
829
|
-
if (subRange) {
|
830
|
-
if (subRange.start.row <= startRow) {
|
831
|
-
break;
|
832
|
-
} else if (subRange.isMultiLine()) {
|
833
|
-
row = subRange.end.row;
|
834
|
-
} else if (startIndent == indent) {
|
835
|
-
break;
|
836
|
-
}
|
837
|
-
}
|
838
|
-
endRow = row;
|
839
|
-
}
|
840
|
-
|
841
|
-
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
842
|
-
};
|
843
|
-
|
844
|
-
this.getCommentRegionBlock = function(session, line, row) {
|
845
|
-
var startColumn = line.search(/\s*$/);
|
846
|
-
var maxRow = session.getLength();
|
847
|
-
var startRow = row;
|
848
|
-
|
849
|
-
var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
|
850
|
-
var depth = 1;
|
851
|
-
while (++row < maxRow) {
|
852
|
-
line = session.getLine(row);
|
853
|
-
var m = re.exec(line);
|
854
|
-
if (!m) continue;
|
855
|
-
if (m[1]) depth--;
|
856
|
-
else depth++;
|
857
|
-
|
858
|
-
if (!depth) break;
|
859
|
-
}
|
860
|
-
|
861
|
-
var endRow = row;
|
862
|
-
if (endRow > startRow) {
|
863
|
-
return new Range(startRow, startColumn, endRow, line.length);
|
864
|
-
}
|
865
|
-
};
|
866
|
-
|
867
|
-
}).call(FoldMode.prototype);
|
868
|
-
|
869
|
-
});
|
870
|
-
|
871
|
-
define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
|
872
|
-
"use strict";
|
873
|
-
|
874
|
-
var oop = require("../lib/oop");
|
875
|
-
var TextMode = require("./text").Mode;
|
876
|
-
var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
|
877
|
-
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
878
|
-
var CssBehaviour = require("./behaviour/css").CssBehaviour;
|
879
|
-
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
880
|
-
|
881
|
-
var Mode = function() {
|
882
|
-
this.HighlightRules = ScssHighlightRules;
|
883
|
-
this.$outdent = new MatchingBraceOutdent();
|
884
|
-
this.$behaviour = new CssBehaviour();
|
885
|
-
this.foldingRules = new CStyleFoldMode();
|
886
|
-
};
|
887
|
-
oop.inherits(Mode, TextMode);
|
888
|
-
|
889
|
-
(function() {
|
890
|
-
|
891
|
-
this.lineCommentStart = "//";
|
892
|
-
this.blockComment = {start: "/*", end: "*/"};
|
893
|
-
|
894
|
-
this.getNextLineIndent = function(state, line, tab) {
|
895
|
-
var indent = this.$getIndent(line);
|
896
|
-
var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
|
897
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
898
|
-
return indent;
|
899
|
-
}
|
900
|
-
|
901
|
-
var match = line.match(/^.*\{\s*$/);
|
902
|
-
if (match) {
|
903
|
-
indent += tab;
|
904
|
-
}
|
905
|
-
|
906
|
-
return indent;
|
907
|
-
};
|
908
|
-
|
909
|
-
this.checkOutdent = function(state, line, input) {
|
910
|
-
return this.$outdent.checkOutdent(line, input);
|
911
|
-
};
|
912
|
-
|
913
|
-
this.autoOutdent = function(state, doc, row) {
|
914
|
-
this.$outdent.autoOutdent(doc, row);
|
915
|
-
};
|
916
|
-
|
917
|
-
this.$id = "ace/mode/scss";
|
918
|
-
}).call(Mode.prototype);
|
919
|
-
|
920
|
-
exports.Mode = Mode;
|
921
|
-
|
922
|
-
});
|