@ -599,7 +599,7 @@ module.exports = config => {
/**
* Trigger event log message
* @param {String} msg String to log
* @param {*} msg Message to log
* @param {Object} [opts={}] Custom options
* @param {String} [opts.ns=''] Namespace of the log (eg. to use in plugins)
* @param {String} [opts.level='debug'] Level of the log, `debug`, `info`, `warning`, `error`
@ -12,8 +12,9 @@ module.exports = (config = {}) => ({
*/
parse(str) {
let result = [];
const customParser = config.parserCss;
const nodes = customParser ? customParser(str) : BrowserCssParser(str);
const { parserCss, em = {} } = config;
const editor = em && em.get('Editor');
const nodes = parserCss ? parserCss(str, editor) : BrowserCssParser(str);
nodes.forEach(node => (result = result.concat(this.checkNode(node))));
return result;