mirror of https://github.com/Nonannet/pyladoc.git
code according to flake8 and mypy updated
This commit is contained in:
parent
1bae23fedf
commit
b9e600615c
|
@ -385,8 +385,8 @@ class DocumentWriter():
|
|||
self.block = attr_dict.get('type') == 'block'
|
||||
elif not self.in_latex:
|
||||
tag_text = self.get_starttag_text()
|
||||
self.self_closing = tag_text.endswith('/>')
|
||||
if tag_text:
|
||||
self.self_closing = tag_text.endswith('/>')
|
||||
self.modified_html.write(tag_text)
|
||||
if tag == 'p':
|
||||
self.p_tags += 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import xml.etree.ElementTree as ET
|
||||
import re
|
||||
from re import Match
|
||||
|
||||
|
||||
def update_svg_ids(input_svg: str, unique_id: str) -> str:
|
||||
"""Add a unique ID part to all svg IDs and update references ti these IDs"""
|
||||
id_mapping: dict[str, str] = {}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import pyladoc
|
||||
|
||||
|
||||
def test_update_svg_ids():
|
||||
test_str = r"""
|
||||
<g id="figure_1">
|
||||
|
@ -28,7 +29,6 @@ def test_update_svg_ids():
|
|||
</defs>
|
||||
|
||||
|
||||
|
||||
<path id="DejaVuSans-Oblique-78" d="M 3841 3500
|
||||
L 2234 1784
|
||||
|
||||
|
|
Loading…
Reference in New Issue