Add Support For PPTX Shape Groups (Fix in code design to not miss out on slide content) (#331)
* Adds support for Shape Groups * Update to Test PPtx for nested shape * This line was accidentally removed and is added back here
This commit is contained in:
@@ -64,7 +64,9 @@ class PptxConverter(HtmlConverter):
|
||||
md_content += f"\n\n<!-- Slide number: {slide_num} -->\n"
|
||||
|
||||
title = slide.shapes.title
|
||||
for shape in slide.shapes:
|
||||
|
||||
def get_shape_content(shape, **kwargs):
|
||||
nonlocal md_content
|
||||
# Pictures
|
||||
if self._is_picture(shape):
|
||||
# https://github.com/scanny/python-pptx/pull/512#issuecomment-1713100069
|
||||
@@ -134,6 +136,14 @@ class PptxConverter(HtmlConverter):
|
||||
else:
|
||||
md_content += shape.text + "\n"
|
||||
|
||||
# Group Shapes
|
||||
if shape.shape_type == pptx.enum.shapes.MSO_SHAPE_TYPE.GROUP:
|
||||
for subshape in shape.shapes:
|
||||
get_shape_content(subshape, **kwargs)
|
||||
|
||||
for shape in slide.shapes:
|
||||
get_shape_content(shape, **kwargs)
|
||||
|
||||
md_content = md_content.strip()
|
||||
|
||||
if slide.has_notes_slide:
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user