mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-26 20:57:35 +03:00
Fix coding style
This commit is contained in:
parent
0fe22b3c14
commit
420e6e603b
@ -280,6 +280,7 @@ def test_text_tspan(assert_pixels):
|
||||
</svg>
|
||||
''')
|
||||
|
||||
|
||||
@assert_no_logs
|
||||
def test_text_tspan_anchor_middle(assert_pixels):
|
||||
assert_pixels('''
|
||||
@ -296,8 +297,7 @@ def test_text_tspan_anchor_middle(assert_pixels):
|
||||
<tspan x="10" y="1.5" text-anchor="middle">ABC</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
''',
|
||||
)
|
||||
''')
|
||||
|
||||
|
||||
@assert_no_logs
|
||||
@ -316,8 +316,8 @@ def test_text_tspan_anchor_end(assert_pixels):
|
||||
<tspan x="18" y="1.5" text-anchor="end">ABC</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
''',
|
||||
)
|
||||
''')
|
||||
|
||||
|
||||
@assert_no_logs
|
||||
def test_text_rotate(assert_pixels):
|
||||
|
@ -438,7 +438,7 @@ class SVG:
|
||||
|
||||
# Handle text anchor
|
||||
text_anchor = node.get('text-anchor')
|
||||
if (node.tag == 'text' or node.tag == 'tspan') and text_anchor in ('middle', 'end'):
|
||||
if TAGS.get(node.tag) == text and text_anchor in ('middle', 'end'):
|
||||
group = self.stream.add_group(0, 0, 0, 0) # BBox set after drawing
|
||||
original_streams.append(self.stream)
|
||||
self.stream = group
|
||||
|
Loading…
Reference in New Issue
Block a user