ktrk115 commited on
Commit
0012b8d
·
verified ·
1 Parent(s): 6d6c47a

Update processing_markupdm.py

Browse files
Files changed (1) hide show
  1. processing_markupdm.py +1 -1
processing_markupdm.py CHANGED
@@ -431,7 +431,7 @@ class MarkupDMProcessor(ProcessorMixin): # type: ignore
431
  assert matched is not None, "SVG tag not found"
432
  i = matched.span()[1]
433
  style = f"<style>{style_text}</style>"
434
- example["svg"] = svg[:i] + style.as_str() + svg[i:]
435
 
436
  def render(self, example: dict, save_dir: str | Path | None = None) -> Image.Image:
437
  with tempfile.TemporaryDirectory() as tmp_dir:
 
431
  assert matched is not None, "SVG tag not found"
432
  i = matched.span()[1]
433
  style = f"<style>{style_text}</style>"
434
+ example["svg"] = svg[:i] + style + svg[i:]
435
 
436
  def render(self, example: dict, save_dir: str | Path | None = None) -> Image.Image:
437
  with tempfile.TemporaryDirectory() as tmp_dir: