diff --git a/mode/css/css.js b/mode/css/css.js index 90de4ee795c875167129294b87b49d74e3af274e..16d6f05b9f440faff0805a7beaca94c84c7153bf 100644 --- a/mode/css/css.js +++ b/mode/css/css.js @@ -28,6 +28,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { colorKeywords = parserConfig.colorKeywords || {}, valueKeywords = parserConfig.valueKeywords || {}, allowNested = parserConfig.allowNested, + lineComment = parserConfig.lineComment, supportsAtComponent = parserConfig.supportsAtComponent === true; var type, override; @@ -407,6 +408,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { electricChars: "}", blockCommentStart: "/*", blockCommentEnd: "*/", + lineComment: lineComment, fold: "brace" }; }); @@ -730,6 +732,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { valueKeywords: valueKeywords, fontProperties: fontProperties, allowNested: true, + lineComment: "//", tokenHooks: { "/": function(stream, state) { if (stream.eat("/")) { @@ -772,6 +775,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { valueKeywords: valueKeywords, fontProperties: fontProperties, allowNested: true, + lineComment: "//", tokenHooks: { "/": function(stream, state) { if (stream.eat("/")) {