Log Message: ----------- handle attributes in single quotes Modified Files: -------------- docbook2mdoc: parse.c statistics.c Revision Data ------------- Index: parse.c =================================================================== RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v retrieving revision 1.9 retrieving revision 1.10 diff -Lparse.c -Lparse.c -u -p -r1.9 -r1.10 --- parse.c +++ parse.c @@ -692,14 +692,16 @@ parse_file(struct parse *p, int fd, cons /* Parse an attribute value. */ if (in_arg) { - if (in_quotes == 0 && b[pend] == '"') { - in_quotes = 1; + if (in_quotes == 0 && + (b[pend] == '\'' || b[pend] == '"')) { + in_quotes = b[pend] == '"' ? 2 : 1; p->ncol++; pend++; continue; } if (advance(p, b, rlen, &pend, - in_quotes ? "\"" : " >") && rsz > 0) + in_quotes == 2 ? "\"" : + in_quotes == 1 ? "'" : " >") && rsz > 0) break; in_arg = in_quotes = elem_end = 0; if (b[pend] == '>') { Index: statistics.c =================================================================== RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v retrieving revision 1.4 retrieving revision 1.5 diff -Lstatistics.c -Lstatistics.c -u -p -r1.4 -r1.5 --- statistics.c +++ statistics.c @@ -225,13 +225,15 @@ parse_file(int fd, char *fname) continue; } if (in_arg) { - if (in_quotes == 0 && b[pend] == '"') { - in_quotes = 1; + if (in_quotes == 0 && + (b[pend] == '\'' || b[pend] == '"')) { + in_quotes = b[pend] == '"' ? 2 : 1; pend++; continue; } if (advance(b, rlen, &pend, - in_quotes ? "\"" : " >") && rsz > 0) + in_quotes == 2 ? "\"" : + in_quotes == 1 ? "'" : " >") && rsz > 0) break; in_arg = in_quotes = elem_end = 0; if (b[pend] == '>') { -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv