mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-02 11:52:30 +03:00
Remove extraneous div from SVG output
This commit is contained in:
parent
785b9daea9
commit
a05a85b103
3
paint.py
3
paint.py
@ -644,7 +644,6 @@ pre {
|
|||||||
def get_svg(self) -> str:
|
def get_svg(self) -> str:
|
||||||
"""Get the SVG representation of the document."""
|
"""Get the SVG representation of the document."""
|
||||||
css = """
|
css = """
|
||||||
div,
|
|
||||||
pre {
|
pre {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -663,9 +662,7 @@ font {
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="{self.width}ch" height="{self.height}lh">
|
<svg xmlns="http://www.w3.org/2000/svg" width="{self.width}ch" height="{self.height}lh">
|
||||||
<style>{css}</style>
|
<style>{css}</style>
|
||||||
<foreignObject x="0" y="0" width="80ch" height="38lh">
|
<foreignObject x="0" y="0" width="80ch" height="38lh">
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<pre xmlns="http://www.w3.org/1999/xhtml">{self.get_pre_inner_xhtml()}</pre>
|
<pre xmlns="http://www.w3.org/1999/xhtml">{self.get_pre_inner_xhtml()}</pre>
|
||||||
</div>
|
|
||||||
</foreignObject>
|
</foreignObject>
|
||||||
</svg>
|
</svg>
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user