Skip to content

Backport PR #17668 on branch v3.3.x (Don't pass "wrong" indent=False in SVG generation.) #17672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def _write_metadata(self, metadata):
writer = self.writer

if 'Title' in metadata:
writer.element('title', text=metadata['Title'], indent=False)
writer.element('title', text=metadata['Title'])

# Special handling.
date = metadata.get('Date', None)
Expand Down Expand Up @@ -387,7 +387,7 @@ def _write_metadata(self, metadata):
'identifier', 'language', 'relation', 'source']:
info = metadata.pop(key.title(), None)
if info is not None:
writer.element(f'dc:{key}', text=info, indent=False)
writer.element(f'dc:{key}', text=info)

# Multiple Agent values.
for key in ['creator', 'contributor', 'publisher', 'rights']:
Expand All @@ -401,7 +401,7 @@ def _write_metadata(self, metadata):
writer.start(f'dc:{key}')
for agent in agents:
writer.start('cc:Agent')
writer.element('dc:title', text=agent, indent=False)
writer.element('dc:title', text=agent)
writer.end('cc:Agent')
writer.end(f'dc:{key}')

Expand All @@ -414,7 +414,7 @@ def _write_metadata(self, metadata):
writer.start('dc:subject')
writer.start('rdf:Bag')
for keyword in keywords:
writer.element('rdf:li', text=keyword, indent=False)
writer.element('rdf:li', text=keyword)
writer.end('rdf:Bag')
writer.end('dc:subject')

Expand Down