diff --git a/src/mixins/itext.svg_export.js b/src/mixins/itext.svg_export.js index a5f2ee5c..d17910c8 100644 --- a/src/mixins/itext.svg_export.js +++ b/src/mixins/itext.svg_export.js @@ -47,9 +47,9 @@ (this.fontStyle ? 'font-style="' + this.fontStyle + '" ' : ''), (this.fontWeight ? 'font-weight="' + this.fontWeight + '" ' : ''), (textDecoration ? 'text-decoration="' + textDecoration + '" ' : ''), - 'style="', this.getSvgStyles(noShadow), '"', this.addPaintOrder(), ' >\n', + 'style="', this.getSvgStyles(noShadow), '"', this.addPaintOrder(), ' >', textAndBg.textSpans.join(''), - '\t\t\n', + '\n', '\t\n' ); }, @@ -91,11 +91,11 @@ fillStyles = styleProps ? 'style="' + styleProps + '"' : ''; return [ - '\t\t\t', fabric.util.string.escapeXml(_char), - '\n' + '' ].join(''); }, diff --git a/test/unit/text.js b/test/unit/text.js index e210578d..55f4de2b 100644 --- a/test/unit/text.js +++ b/test/unit/text.js @@ -59,8 +59,8 @@ 'styles': {} }; - var TEXT_SVG = '\t\n\t\t\n\t\t\tx\n\t\t\n\t\n'; - var TEXT_SVG_JUSTIFIED = '\t\n\t\t\n\t\t\txxxxxx\n\t\t\tx \n\t\t\ty\n\t\t\n\t\n'; + var TEXT_SVG = '\t\n\t\tx\n\t\n'; + var TEXT_SVG_JUSTIFIED = '\t\n\t\txxxxxxx y\n\t\n'; QUnit.test('constructor', function(assert) { assert.ok(fabric.Text);