Skip to content

Commit 33a666a

Browse files
committed
Fix attr mode skipping last attribute
1 parent 9f02436 commit 33a666a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

main.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,7 @@ static map<const string, const function<void(myhtml_tree_node_t*)>> mode_handler
291291
cout << mycore_string_data(&attr->value);
292292
printf("%c", state["delim"][0]);
293293
}
294-
295-
if(attr != token->attr_last) attr = attr->next;
296-
}while(attr != token->attr_last);
294+
}while(attr != token->attr_last && (attr = attr->next)); // move attr pointer further & loop if attr_last not hit
297295
}}
298296
};
299297

0 commit comments

Comments
 (0)