cleanup d mode
This commit is contained in:
parent
a6c21c6761
commit
869e1f86aa
1 changed files with 5 additions and 5 deletions
|
|
@ -191,7 +191,7 @@ var DHighlightRules = function() {
|
||||||
"star-comment" : [
|
"star-comment" : [
|
||||||
{
|
{
|
||||||
token : "comment", // closing comment
|
token : "comment", // closing comment
|
||||||
regex : ".*?\\*\\/",
|
regex : "\\*\\/",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
defaultToken: 'comment'
|
defaultToken: 'comment'
|
||||||
|
|
@ -200,7 +200,7 @@ var DHighlightRules = function() {
|
||||||
"plus-comment" : [
|
"plus-comment" : [
|
||||||
{
|
{
|
||||||
token : "comment", // closing comment
|
token : "comment", // closing comment
|
||||||
regex : ".*?\\+\\/",
|
regex : "\\+\\/",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
defaultToken: 'comment'
|
defaultToken: 'comment'
|
||||||
|
|
@ -211,7 +211,7 @@ var DHighlightRules = function() {
|
||||||
stringEscapesSeq,
|
stringEscapesSeq,
|
||||||
{
|
{
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"[cdw]?',
|
regex : '"[cdw]?',
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
defaultToken: 'string'
|
defaultToken: 'string'
|
||||||
|
|
@ -222,7 +222,7 @@ var DHighlightRules = function() {
|
||||||
stringEscapesSeq,
|
stringEscapesSeq,
|
||||||
{
|
{
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : '(?:(?:\\\\.)|(?:[^`\\\\]))*?`[cdw]?',
|
regex : '`[cdw]?',
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
defaultToken: 'string'
|
defaultToken: 'string'
|
||||||
|
|
@ -234,7 +234,7 @@ var DHighlightRules = function() {
|
||||||
onMatch: function(value, currentState, state) {
|
onMatch: function(value, currentState, state) {
|
||||||
value = value.substring(value.length-2, value.length-1);
|
value = value.substring(value.length-2, value.length-1);
|
||||||
var map = {'>':'<',']':'[',')':'(','}':'{'};
|
var map = {'>':'<',']':'[',')':'(','}':'{'};
|
||||||
if(Object.keys(map).indexOf(value) != -1)
|
if(Object.keys(map).indexOf(value) != -1)
|
||||||
value = map[value];
|
value = map[value];
|
||||||
if(value != state[1]) return "string";
|
if(value != state[1]) return "string";
|
||||||
state.shift();
|
state.shift();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue