corrade-nucleus-nucleons – Blame information for rev 20
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { |
2 | "use strict"; |
||
3 | |||
4 | var oop = require("../lib/oop"); |
||
5 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; |
||
6 | |||
7 | var ApacheConfHighlightRules = function() { |
||
8 | |||
9 | this.$rules = { start: |
||
10 | [ { token: |
||
11 | [ 'punctuation.definition.comment.apacheconf', |
||
12 | 'comment.line.hash.ini', |
||
13 | 'comment.line.hash.ini' ], |
||
14 | regex: '^((?:\\s)*)(#)(.*$)' }, |
||
15 | { token: |
||
16 | [ 'punctuation.definition.tag.apacheconf', |
||
17 | 'entity.tag.apacheconf', |
||
18 | 'text', |
||
19 | 'string.value.apacheconf', |
||
20 | 'punctuation.definition.tag.apacheconf' ], |
||
21 | regex: '(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)' }, |
||
22 | { token: |
||
23 | [ 'punctuation.definition.tag.apacheconf', |
||
24 | 'entity.tag.apacheconf', |
||
25 | 'punctuation.definition.tag.apacheconf' ], |
||
26 | regex: '(</)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(>)' }, |
||
27 | { token: |
||
28 | [ 'keyword.alias.apacheconf', 'text', |
||
29 | 'string.regexp.apacheconf', 'text', |
||
30 | 'string.replacement.apacheconf', 'text' ], |
||
31 | regex: '(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)' }, |
||
32 | { token: |
||
33 | [ 'keyword.alias.apacheconf', 'text', |
||
34 | 'entity.status.apacheconf', 'text', |
||
35 | 'string.regexp.apacheconf', 'text', |
||
36 | 'string.path.apacheconf', 'text' ], |
||
37 | regex: '(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, |
||
38 | { token: |
||
39 | [ 'keyword.alias.apacheconf', 'text', |
||
40 | 'entity.status.apacheconf', 'text', |
||
41 | 'string.path.apacheconf', 'text', |
||
42 | 'string.path.apacheconf', 'text' ], |
||
43 | regex: '(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, |
||
44 | { token: |
||
45 | [ 'keyword.alias.apacheconf', 'text', |
||
46 | 'string.regexp.apacheconf', 'text', |
||
47 | 'string.path.apacheconf', 'text' ], |
||
48 | regex: '(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?' }, |
||
49 | { token: |
||
50 | [ 'keyword.alias.apacheconf', 'text', |
||
51 | 'string.path.apacheconf', 'text', |
||
52 | 'string.path.apacheconf', 'text' ], |
||
53 | regex: '(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, |
||
54 | { token: 'keyword.core.apacheconf', |
||
55 | regex: '\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b' }, |
||
56 | { token: 'keyword.mpm.apacheconf', |
||
57 | regex: '\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b' }, |
||
58 | { token: 'keyword.access.apacheconf', |
||
59 | regex: '\\b(?:Allow|Deny|Order)\\b' }, |
||
60 | { token: 'keyword.actions.apacheconf', |
||
61 | regex: '\\b(?:Action|Script)\\b' }, |
||
62 | { token: 'keyword.alias.apacheconf', |
||
63 | regex: '\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b' }, |
||
64 | { token: 'keyword.auth.apacheconf', |
||
65 | regex: '\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b' }, |
||
66 | { token: 'keyword.auth_anon.apacheconf', |
||
67 | regex: '\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b' }, |
||
68 | { token: 'keyword.auth_dbm.apacheconf', |
||
69 | regex: '\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b' }, |
||
70 | { token: 'keyword.auth_digest.apacheconf', |
||
71 | regex: '\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b' }, |
||
72 | { token: 'keyword.auth_ldap.apacheconf', |
||
73 | regex: '\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b' }, |
||
74 | { token: 'keyword.autoindex.apacheconf', |
||
75 | regex: '\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b' }, |
||
76 | { token: 'keyword.cache.apacheconf', |
||
77 | regex: '\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b' }, |
||
78 | { token: 'keyword.cern_meta.apacheconf', |
||
79 | regex: '\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b' }, |
||
80 | { token: 'keyword.cgi.apacheconf', |
||
81 | regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b' }, |
||
82 | { token: 'keyword.cgid.apacheconf', |
||
83 | regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b' }, |
||
84 | { token: 'keyword.charset_lite.apacheconf', |
||
85 | regex: '\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b' }, |
||
86 | { token: 'keyword.dav.apacheconf', |
||
87 | regex: '\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b' }, |
||
88 | { token: 'keyword.deflate.apacheconf', |
||
89 | regex: '\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b' }, |
||
90 | { token: 'keyword.dir.apacheconf', |
||
91 | regex: '\\b(?:DirectoryIndex|DirectorySlash)\\b' }, |
||
92 | { token: 'keyword.disk_cache.apacheconf', |
||
93 | regex: '\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b' }, |
||
94 | { token: 'keyword.dumpio.apacheconf', |
||
95 | regex: '\\b(?:DumpIOInput|DumpIOOutput)\\b' }, |
||
96 | { token: 'keyword.env.apacheconf', |
||
97 | regex: '\\b(?:PassEnv|SetEnv|UnsetEnv)\\b' }, |
||
98 | { token: 'keyword.expires.apacheconf', |
||
99 | regex: '\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b' }, |
||
100 | { token: 'keyword.ext_filter.apacheconf', |
||
101 | regex: '\\b(?:ExtFilterDefine|ExtFilterOptions)\\b' }, |
||
102 | { token: 'keyword.file_cache.apacheconf', |
||
103 | regex: '\\b(?:CacheFile|MMapFile)\\b' }, |
||
104 | { token: 'keyword.headers.apacheconf', |
||
105 | regex: '\\b(?:Header|RequestHeader)\\b' }, |
||
106 | { token: 'keyword.imap.apacheconf', |
||
107 | regex: '\\b(?:ImapBase|ImapDefault|ImapMenu)\\b' }, |
||
108 | { token: 'keyword.include.apacheconf', |
||
109 | regex: '\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b' }, |
||
110 | { token: 'keyword.isapi.apacheconf', |
||
111 | regex: '\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b' }, |
||
112 | { token: 'keyword.ldap.apacheconf', |
||
113 | regex: '\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b' }, |
||
114 | { token: 'keyword.log.apacheconf', |
||
115 | regex: '\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b' }, |
||
116 | { token: 'keyword.mem_cache.apacheconf', |
||
117 | regex: '\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b' }, |
||
118 | { token: 'keyword.mime.apacheconf', |
||
119 | regex: '\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b' }, |
||
120 | { token: 'keyword.misc.apacheconf', |
||
121 | regex: '\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b' }, |
||
122 | { token: 'keyword.negotiation.apacheconf', |
||
123 | regex: '\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b' }, |
||
124 | { token: 'keyword.nw_ssl.apacheconf', |
||
125 | regex: '\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b' }, |
||
126 | { token: 'keyword.proxy.apacheconf', |
||
127 | regex: '\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b' }, |
||
128 | { token: 'keyword.rewrite.apacheconf', |
||
129 | regex: '\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b' }, |
||
130 | { token: 'keyword.setenvif.apacheconf', |
||
131 | regex: '\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b' }, |
||
132 | { token: 'keyword.so.apacheconf', |
||
133 | regex: '\\b(?:LoadFile|LoadModule)\\b' }, |
||
134 | { token: 'keyword.ssl.apacheconf', |
||
135 | regex: '\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b' }, |
||
136 | { token: 'keyword.usertrack.apacheconf', |
||
137 | regex: '\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b' }, |
||
138 | { token: 'keyword.vhost_alias.apacheconf', |
||
139 | regex: '\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b' }, |
||
140 | { token: |
||
141 | [ 'keyword.php.apacheconf', |
||
142 | 'text', |
||
143 | 'entity.property.apacheconf', |
||
144 | 'text', |
||
145 | 'string.value.apacheconf', |
||
146 | 'text' ], |
||
147 | regex: '\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)' }, |
||
148 | { token: |
||
149 | [ 'punctuation.variable.apacheconf', |
||
150 | 'variable.env.apacheconf', |
||
151 | 'variable.misc.apacheconf', |
||
152 | 'punctuation.variable.apacheconf' ], |
||
153 | regex: '(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})' }, |
||
154 | { token: [ 'entity.mime-type.apacheconf', 'text' ], |
||
155 | regex: '\\b((?:text|image|application|video|audio)/.+?)(\\s)' }, |
||
156 | { token: 'entity.helper.apacheconf', |
||
157 | regex: '\\b(?:from|unset|set|on|off)\\b', |
||
158 | caseInsensitive: true }, |
||
159 | { token: 'constant.integer.apacheconf', regex: '\\b\\d+\\b' }, |
||
160 | { token: |
||
161 | [ 'text', |
||
162 | 'punctuation.definition.flag.apacheconf', |
||
163 | 'string.flag.apacheconf', |
||
164 | 'punctuation.definition.flag.apacheconf', |
||
165 | 'text' ], |
||
166 | regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] } |
||
167 | |||
168 | this.normalizeRules(); |
||
169 | }; |
||
170 | |||
171 | ApacheConfHighlightRules.metaData = { fileTypes: |
||
172 | [ 'conf', |
||
173 | 'CONF', |
||
174 | 'htaccess', |
||
175 | 'HTACCESS', |
||
176 | 'htgroups', |
||
177 | 'HTGROUPS', |
||
178 | 'htpasswd', |
||
179 | 'HTPASSWD', |
||
180 | '.htaccess', |
||
181 | '.HTACCESS', |
||
182 | '.htgroups', |
||
183 | '.HTGROUPS', |
||
184 | '.htpasswd', |
||
185 | '.HTPASSWD' ], |
||
186 | name: 'Apache Conf', |
||
187 | scopeName: 'source.apacheconf' } |
||
188 | |||
189 | |||
190 | oop.inherits(ApacheConfHighlightRules, TextHighlightRules); |
||
191 | |||
192 | exports.ApacheConfHighlightRules = ApacheConfHighlightRules; |
||
193 | }); |
||
194 | |||
195 | define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { |
||
196 | "use strict"; |
||
197 | |||
198 | var oop = require("../../lib/oop"); |
||
199 | var Range = require("../../range").Range; |
||
200 | var BaseFoldMode = require("./fold_mode").FoldMode; |
||
201 | |||
202 | var FoldMode = exports.FoldMode = function(commentRegex) { |
||
203 | if (commentRegex) { |
||
204 | this.foldingStartMarker = new RegExp( |
||
205 | this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) |
||
206 | ); |
||
207 | this.foldingStopMarker = new RegExp( |
||
208 | this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) |
||
209 | ); |
||
210 | } |
||
211 | }; |
||
212 | oop.inherits(FoldMode, BaseFoldMode); |
||
213 | |||
214 | (function() { |
||
215 | |||
216 | this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; |
||
217 | this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; |
||
218 | this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; |
||
219 | this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; |
||
220 | this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; |
||
221 | this._getFoldWidgetBase = this.getFoldWidget; |
||
222 | this.getFoldWidget = function(session, foldStyle, row) { |
||
223 | var line = session.getLine(row); |
||
224 | |||
225 | if (this.singleLineBlockCommentRe.test(line)) { |
||
226 | if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) |
||
227 | return ""; |
||
228 | } |
||
229 | |||
230 | var fw = this._getFoldWidgetBase(session, foldStyle, row); |
||
231 | |||
232 | if (!fw && this.startRegionRe.test(line)) |
||
233 | return "start"; // lineCommentRegionStart |
||
234 | |||
235 | return fw; |
||
236 | }; |
||
237 | |||
238 | this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { |
||
239 | var line = session.getLine(row); |
||
240 | |||
241 | if (this.startRegionRe.test(line)) |
||
242 | return this.getCommentRegionBlock(session, line, row); |
||
243 | |||
244 | var match = line.match(this.foldingStartMarker); |
||
245 | if (match) { |
||
246 | var i = match.index; |
||
247 | |||
248 | if (match[1]) |
||
249 | return this.openingBracketBlock(session, match[1], row, i); |
||
250 | |||
251 | var range = session.getCommentFoldRange(row, i + match[0].length, 1); |
||
252 | |||
253 | if (range && !range.isMultiLine()) { |
||
254 | if (forceMultiline) { |
||
255 | range = this.getSectionRange(session, row); |
||
256 | } else if (foldStyle != "all") |
||
257 | range = null; |
||
258 | } |
||
259 | |||
260 | return range; |
||
261 | } |
||
262 | |||
263 | if (foldStyle === "markbegin") |
||
264 | return; |
||
265 | |||
266 | var match = line.match(this.foldingStopMarker); |
||
267 | if (match) { |
||
268 | var i = match.index + match[0].length; |
||
269 | |||
270 | if (match[1]) |
||
271 | return this.closingBracketBlock(session, match[1], row, i); |
||
272 | |||
273 | return session.getCommentFoldRange(row, i, -1); |
||
274 | } |
||
275 | }; |
||
276 | |||
277 | this.getSectionRange = function(session, row) { |
||
278 | var line = session.getLine(row); |
||
279 | var startIndent = line.search(/\S/); |
||
280 | var startRow = row; |
||
281 | var startColumn = line.length; |
||
282 | row = row + 1; |
||
283 | var endRow = row; |
||
284 | var maxRow = session.getLength(); |
||
285 | while (++row < maxRow) { |
||
286 | line = session.getLine(row); |
||
287 | var indent = line.search(/\S/); |
||
288 | if (indent === -1) |
||
289 | continue; |
||
290 | if (startIndent > indent) |
||
291 | break; |
||
292 | var subRange = this.getFoldWidgetRange(session, "all", row); |
||
293 | |||
294 | if (subRange) { |
||
295 | if (subRange.start.row <= startRow) { |
||
296 | break; |
||
297 | } else if (subRange.isMultiLine()) { |
||
298 | row = subRange.end.row; |
||
299 | } else if (startIndent == indent) { |
||
300 | break; |
||
301 | } |
||
302 | } |
||
303 | endRow = row; |
||
304 | } |
||
305 | |||
306 | return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); |
||
307 | }; |
||
308 | this.getCommentRegionBlock = function(session, line, row) { |
||
309 | var startColumn = line.search(/\s*$/); |
||
310 | var maxRow = session.getLength(); |
||
311 | var startRow = row; |
||
312 | |||
313 | var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; |
||
314 | var depth = 1; |
||
315 | while (++row < maxRow) { |
||
316 | line = session.getLine(row); |
||
317 | var m = re.exec(line); |
||
318 | if (!m) continue; |
||
319 | if (m[1]) depth--; |
||
320 | else depth++; |
||
321 | |||
322 | if (!depth) break; |
||
323 | } |
||
324 | |||
325 | var endRow = row; |
||
326 | if (endRow > startRow) { |
||
327 | return new Range(startRow, startColumn, endRow, line.length); |
||
328 | } |
||
329 | }; |
||
330 | |||
331 | }).call(FoldMode.prototype); |
||
332 | |||
333 | }); |
||
334 | |||
335 | define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { |
||
336 | "use strict"; |
||
337 | |||
338 | var oop = require("../lib/oop"); |
||
339 | var TextMode = require("./text").Mode; |
||
340 | var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules; |
||
341 | var FoldMode = require("./folding/cstyle").FoldMode; |
||
342 | |||
343 | var Mode = function() { |
||
344 | this.HighlightRules = ApacheConfHighlightRules; |
||
345 | this.foldingRules = new FoldMode(); |
||
346 | this.$behaviour = this.$defaultBehaviour; |
||
347 | }; |
||
348 | oop.inherits(Mode, TextMode); |
||
349 | |||
350 | (function() { |
||
351 | this.lineCommentStart = "#"; |
||
352 | this.$id = "ace/mode/apache_conf"; |
||
353 | }).call(Mode.prototype); |
||
354 | |||
355 | exports.Mode = Mode; |
||
356 | }); |