From b3010eddf829821ef279ce80a73047b6e6db6011 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke <marijnh@gmail.com> Date: Sun, 13 Dec 2015 00:07:29 +0100 Subject: [PATCH] [css mode] Clean up handling of inline option --- mode/css/css.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mode/css/css.js b/mode/css/css.js index b20b4907e..2673074ab 100644 --- a/mode/css/css.js +++ b/mode/css/css.js @@ -12,9 +12,8 @@ "use strict"; CodeMirror.defineMode("css", function(config, parserConfig) { - var provided = parserConfig; + var inline = parserConfig.inline if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css"); - parserConfig.inline = provided.inline; var indentUnit = config.indentUnit, tokenHooks = parserConfig.tokenHooks, @@ -368,9 +367,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) { return { startState: function(base) { return {tokenize: null, - state: parserConfig.inline ? "block" : "top", + state: inline ? "block" : "top", stateArg: null, - context: new Context(parserConfig.inline ? "block" : "top", base || 0, null)}; + context: new Context(inline ? "block" : "top", base || 0, null)}; }, token: function(stream, state) { -- GitLab