fixup a44b4e78: css_beautify is exposed via exports

This commit is contained in:
tophf 2017-08-28 15:15:49 +03:00
parent dd6182aef3
commit efc001c01d

View File

@ -1,6 +1,6 @@
/* eslint brace-style: 0, operator-linebreak: 0 */ /* eslint brace-style: 0, operator-linebreak: 0 */
/* global CodeMirror parserlib */ /* global CodeMirror parserlib */
/* global exports css_beautify onDOMscripted */ /* global exports onDOMscripted */
/* global CSSLint initLint linterConfig updateLintReport renderLintReport updateLinter */ /* global CSSLint initLint linterConfig updateLintReport renderLintReport updateLinter */
'use strict'; 'use strict';
@ -1125,7 +1125,7 @@ function beautify(event) {
[].concat.apply([], cm.doc.sel.ranges.map(r => [].concat.apply([], cm.doc.sel.ranges.map(r =>
[Object.assign({}, r.anchor), Object.assign({}, r.head)])); [Object.assign({}, r.anchor), Object.assign({}, r.head)]));
const text = cm.getValue(); const text = cm.getValue();
const newText = css_beautify(text, options); const newText = exports.css_beautify(text, options);
if (newText !== text) { if (newText !== text) {
if (!cm.beautifyChange || !cm.beautifyChange[cm.changeGeneration()]) { if (!cm.beautifyChange || !cm.beautifyChange[cm.changeGeneration()]) {
// clear the list if last change wasn't a css-beautify // clear the list if last change wasn't a css-beautify