FWS = 1*WSP This isn't the RFC definition. We're using fws to represent tokens where folding can be done, but when we are parsing the *un*folding has already been done so we don't need to watch out for CRLF.
(value)
| 1044 | return ''.join(vchars), ''.join([fragment[pos:]] + remainder), had_qp |
| 1045 | |
| 1046 | def get_fws(value): |
| 1047 | """FWS = 1*WSP |
| 1048 | |
| 1049 | This isn't the RFC definition. We're using fws to represent tokens where |
| 1050 | folding can be done, but when we are parsing the *un*folding has already |
| 1051 | been done so we don't need to watch out for CRLF. |
| 1052 | |
| 1053 | """ |
| 1054 | newvalue = value.lstrip() |
| 1055 | fws = WhiteSpaceTerminal(value[:len(value)-len(newvalue)], 'fws') |
| 1056 | return fws, newvalue |
| 1057 | |
| 1058 | def get_encoded_word(value, terminal_type='vtext'): |
| 1059 | """ encoded-word = "=?" charset "?" encoding "?" encoded-text "?=" |
no test coverage detected