| 1815 | template <typename opt_eol, typename opt_escape> struct strconv_pcdata_impl |
| 1816 | { |
| 1817 | static char_t* parse(char_t* s) |
| 1818 | { |
| 1819 | gap g; |
| 1820 | |
| 1821 | while (true) |
| 1822 | { |
| 1823 | while (!PUGI__IS_CHARTYPE(*s, ct_parse_pcdata)) ++s; |
| 1824 | |
| 1825 | if (*s == '<') // PCDATA ends here |
| 1826 | { |
| 1827 | *g.flush(s) = 0; |
| 1828 | |
| 1829 | return s + 1; |
| 1830 | } |
| 1831 | else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair |
| 1832 | { |
| 1833 | *s++ = '\n'; // replace first one with 0x0a |
| 1834 | |
| 1835 | if (*s == '\n') g.push(s, 1); |
| 1836 | } |
| 1837 | else if (opt_escape::value && *s == '&') |
| 1838 | { |
| 1839 | s = strconv_escape(s, g); |
| 1840 | } |
| 1841 | else if (*s == 0) |
| 1842 | { |
| 1843 | return s; |
| 1844 | } |
| 1845 | else ++s; |
| 1846 | } |
| 1847 | } |
| 1848 | }; |
| 1849 | |
| 1850 | PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask) |
nothing calls this directly
no test coverage detected