Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

fix(svg_to_pptx): parse scientific notation in point lists

hugohe37d7fed1a9c9d
diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml_elements.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml_elements.py
index e71f28cb..b2fb8124 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml_elements.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml_elements.py
@@ -801,7 +801,7 @@ def convert_path(elem: ET.Element, ctx: ConvertContext) -> ShapeResult | None:
def _parse_points(points_str: str) -> list[tuple[float, float]]:
"""Parse SVG points attribute into a list of (x, y) tuples."""
- nums = re.findall(r'[-+]?(?:\d+\.?\d*|\.\d+)', points_str)
+ nums = re.findall(r'[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?', points_str)
if len(nums) < 4:
return []
return [(float(nums[i]), float(nums[i + 1])) for i in range(0, len(nums) - 1, 2)]