| 1746 | } |
| 1747 | |
| 1748 | static char_t* parse_wconv(char_t* s, char_t end_quote) |
| 1749 | { |
| 1750 | gap g; |
| 1751 | |
| 1752 | while (true) |
| 1753 | { |
| 1754 | while (!IS_CHARTYPE(*s, ct_parse_attr_ws)) ++s; |
| 1755 | |
| 1756 | if (*s == end_quote) |
| 1757 | { |
| 1758 | *g.flush(s) = 0; |
| 1759 | |
| 1760 | return s + 1; |
| 1761 | } |
| 1762 | else if (IS_CHARTYPE(*s, ct_space)) |
| 1763 | { |
| 1764 | if (*s == '\r') |
| 1765 | { |
| 1766 | *s++ = ' '; |
| 1767 | |
| 1768 | if (*s == '\n') g.push(s, 1); |
| 1769 | } |
| 1770 | else *s++ = ' '; |
| 1771 | } |
| 1772 | else if (opt_escape::value && *s == '&') |
| 1773 | { |
| 1774 | s = strconv_escape(s, g); |
| 1775 | } |
| 1776 | else if (!*s) |
| 1777 | { |
| 1778 | return 0; |
| 1779 | } |
| 1780 | else ++s; |
| 1781 | } |
| 1782 | } |
| 1783 | |
| 1784 | static char_t* parse_eol(char_t* s, char_t end_quote) |
| 1785 | { |
nothing calls this directly
no test coverage detected