Skip to content
Snippets Groups Projects
Commit 52ad899d authored by Anders Wåglund's avatar Anders Wåglund Committed by Marijn Haverbeke
Browse files

[css mode] Add `inline` option

parent b22783dc
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,9 @@
"use strict";
CodeMirror.defineMode("css", function(config, parserConfig) {
var provided = parserConfig;
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
parserConfig.inline = provided.inline;
var indentUnit = config.indentUnit,
tokenHooks = parserConfig.tokenHooks,
......@@ -338,9 +340,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
return {
startState: function(base) {
return {tokenize: null,
state: "top",
state: parserConfig.inline ? "block" : "top",
stateArg: null,
context: new Context("top", base || 0, null)};
context: new Context(parserConfig.inline ? "block" : "top", base || 0, null)};
},
token: function(stream, state) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment