| 1782 | } |
| 1783 | |
| 1784 | static char_t* parse_eol(char_t* s, char_t end_quote) |
| 1785 | { |
| 1786 | gap g; |
| 1787 | |
| 1788 | while (true) |
| 1789 | { |
| 1790 | while (!IS_CHARTYPE(*s, ct_parse_attr)) ++s; |
| 1791 | |
| 1792 | if (*s == end_quote) |
| 1793 | { |
| 1794 | *g.flush(s) = 0; |
| 1795 | |
| 1796 | return s + 1; |
| 1797 | } |
| 1798 | else if (*s == '\r') |
| 1799 | { |
| 1800 | *s++ = '\n'; |
| 1801 | |
| 1802 | if (*s == '\n') g.push(s, 1); |
| 1803 | } |
| 1804 | else if (opt_escape::value && *s == '&') |
| 1805 | { |
| 1806 | s = strconv_escape(s, g); |
| 1807 | } |
| 1808 | else if (!*s) |
| 1809 | { |
| 1810 | return 0; |
| 1811 | } |
| 1812 | else ++s; |
| 1813 | } |
| 1814 | } |
| 1815 | |
| 1816 | static char_t* parse_simple(char_t* s, char_t end_quote) |
| 1817 | { |
nothing calls this directly
no test coverage detected