@@ -334,7 +334,7 @@ str static inline parse_attrval(document* d)
334 if (c == '\"' || c == '\'')
334 if (c == '\"' || c == '\'')
336 skip(d, 1);
336 skip(d, 1);
337− int start = d->cursor;
337+ int start = doc_position(d);
338 if (!find(d, c))
338 if (!find(d, c))
340 d->error_message = _strdup("Couldn't find closing attribute bit");
340 d->error_message = _strdup("Couldn't find closing attribute bit");