Merge pull request #537 from deathbaba/next

Correctly process 'bookmarks' in html exported from Google Doc.
This commit is contained in:
Geoff McLane 2017-05-06 15:35:57 +02:00 committed by GitHub
commit d4978608e7

View file

@ -115,6 +115,11 @@ static void CleanNode( TidyDocImpl* doc, Node *node )
else if (nodeIsA(child) && !child->content) else if (nodeIsA(child) && !child->content)
{ {
AttVal *id = TY_(GetAttrByName)( child, "name" ); 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) if (id)
TY_(RepairAttrValue)( doc, child->parent, "id", id->value ); TY_(RepairAttrValue)( doc, child->parent, "id", id->value );