From 87169d89539cb93aaf736660fc8d13c696ace37f Mon Sep 17 00:00:00 2001 From: Alexander Zolotarev Date: Wed, 19 Apr 2017 14:47:27 -1000 Subject: [PATCH] Correctly process 'bookmarks' in html exported from Google Doc. --- src/gdoc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gdoc.c b/src/gdoc.c index 3205536..50cd9bc 100644 --- a/src/gdoc.c +++ b/src/gdoc.c @@ -115,6 +115,11 @@ static void CleanNode( TidyDocImpl* doc, Node *node ) else if (nodeIsA(child) && !child->content) { AttVal *id = TY_(GetAttrByName)( child, "name" ); + /* Recent Google Docs is using "id" instead of "name" in + ** the exported html. + */ + if (!id) + id = TY_(GetAttrByName)( child, "id" ); if (id) TY_(RepairAttrValue)( doc, child->parent, "id", id->value );