1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-31 07:44:22 +03:00

Crossplatform work. Fixes #538

This commit is contained in:
GreLI
2016-08-20 20:39:55 +03:00
parent 815f5cf40c
commit e4003b4dd2
5 changed files with 19 additions and 16 deletions

View File

@ -1,6 +1,7 @@
'use strict';
var EXTEND = require('whet.extend'),
var EOL = require('os').EOL,
EXTEND = require('whet.extend'),
textElem = require('../../plugins/_collections.js').elemsGroups.textContent.concat('title');
var defaults = {
@ -69,14 +70,14 @@ function JS2SVG(config) {
}
if (this.config.pretty) {
this.config.doctypeEnd += '\n';
this.config.procInstEnd += '\n';
this.config.commentEnd += '\n';
this.config.cdataEnd += '\n';
this.config.tagShortEnd += '\n';
this.config.tagOpenEnd += '\n';
this.config.tagCloseEnd += '\n';
this.config.textEnd += '\n';
this.config.doctypeEnd += EOL;
this.config.procInstEnd += EOL;
this.config.commentEnd += EOL;
this.config.cdataEnd += EOL;
this.config.tagShortEnd += EOL;
this.config.tagOpenEnd += EOL;
this.config.tagCloseEnd += EOL;
this.config.textEnd += EOL;
}
this.indentLevel = 0;
@ -282,7 +283,7 @@ JS2SVG.prototype.createElem = function(data) {
if (this.textContext == data) {
this.textContext = null;
if (this.config.pretty) dataEnd = '\n';
if (this.config.pretty) dataEnd = EOL;
}
return openIndent +