From ec91829f3cd2e63e03461da5b37eb3ab43d7d492 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 18 Jun 2020 15:47:51 +0200 Subject: [PATCH] Don't linewrap css in svg header. Output the tiny bit of CSS in every SVG header as ```xml ``` instead of the slightly weirdly indented ``` ``` --- lib/matplotlib/backends/backend_svg.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/matplotlib/backends/backend_svg.py b/lib/matplotlib/backends/backend_svg.py index bfba00063629..f8676c6dfd0f 100644 --- a/lib/matplotlib/backends/backend_svg.py +++ b/lib/matplotlib/backends/backend_svg.py @@ -430,9 +430,7 @@ def _write_default_style(self): 'stroke-linejoin': 'round', 'stroke-linecap': 'butt'}) writer.start('defs') - writer.start('style', type='text/css') - writer.data('*{%s}\n' % default_style) - writer.end('style') + writer.element('style', type='text/css', text='*{%s}' % default_style) writer.end('defs') def _make_id(self, type, content):