| 2172 | } |
| 2173 | |
| 2174 | static char_t* parse_eol(char_t* s, char_t end_quote) |
| 2175 | { |
| 2176 | gap g; |
| 2177 | |
| 2178 | while (true) |
| 2179 | { |
| 2180 | while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr)) |
| 2181 | ++s; |
| 2182 | |
| 2183 | if (*s == end_quote) |
| 2184 | { |
| 2185 | *g.flush(s) = 0; |
| 2186 | |
| 2187 | return s + 1; |
| 2188 | } |
| 2189 | else if (*s == '\r') |
| 2190 | { |
| 2191 | *s++ = '\n'; |
| 2192 | |
| 2193 | if (*s == '\n') |
| 2194 | g.push(s, 1); |
| 2195 | } |
| 2196 | else if (opt_escape::value && *s == '&') |
| 2197 | { |
| 2198 | s = strconv_escape(s, g); |
| 2199 | } |
| 2200 | else if (!*s) |
| 2201 | { |
| 2202 | return 0; |
| 2203 | } |
| 2204 | else |
| 2205 | ++s; |
| 2206 | } |
| 2207 | } |
| 2208 | |
| 2209 | static char_t* parse_simple(char_t* s, char_t end_quote) |
| 2210 | { |
nothing calls this directly
no test coverage detected