mangini / gdocs2md

Convert a Google Drive Document to the Markdown format, suitable for publishing.
Apache License 2.0
2.66k stars 621 forks source link

Unsupported child: INLINE_DRAWING #22

Open webmaster-collabforge opened 10 years ago

webmaster-collabforge commented 10 years ago

I'm getting the following error while parsing a Google Doc.

Paragraph 438 of type PARAGRAPH has an unsupported child: INLINE_DRAWING index=438 (line 155, file "Code")

agouge commented 10 years ago

I'm getting a similar error:

Paragraph 83 of type LIST_ITEM has an unsupported child: EQUATION M index=83 (line 155, file "Code")

agouge commented 10 years ago

Instead of throwing this exception, you can replace this else block with something like

    } else {
      // throw "Paragraph "+index+" of type "+element.getType()+" has an unsupported child: "
      // +t+" "+(element.getChild(i)["getText"] ? element.getChild(i).getText():'')+" index="+index;
      textElements.push(' CONVERSION ERROR ');
    }

This will allow the conversion to go through, replacing nonconvertible elements by " CONVERSION ERROR " in the markdown document.

maciejmyslinski commented 8 years ago

This is really annoying error.

david-a-wheeler commented 3 years ago

After line 154 I added:

} else if (t === DocumentApp.ElementType.INLINE_DRAWING) {
      textElements.push(' (NOTE: INLINE_DRAWING NOT SUPPORTED)');