Skip to content

Commit

Permalink
Don’t fail when markers are undefined references
Browse files Browse the repository at this point in the history
Fix #2239.
  • Loading branch information
liZe committed Aug 23, 2024
1 parent 95a4253 commit cbf10b9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions weasyprint/svg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,10 @@ def draw_markers(self, node, font_size, fill_stroke):
position = 'end'

# Draw marker
marker = markers[position]
if not marker:
if not (marker_node := self.markers.get(markers[position])):
position = 'mid' if angles else 'start'
continue

marker_node = self.markers.get(marker)

# Calculate position, scale and clipping
translate_x, translate_y = self.point(
marker_node.get('refX'), marker_node.get('refY'),
Expand Down

0 comments on commit cbf10b9

Please sign in to comment.