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)
| 1061 | return ''.join(vchars), ''.join([fragment[pos:]] + remainder), had_qp |
| 1062 | |
| 1063 | def get_fws(value): |
| 1064 | """FWS = 1*WSP |
| 1065 | |
| 1066 | This isn't the RFC definition. We're using fws to represent tokens where |
| 1067 | folding can be done, but when we are parsing the *un*folding has already |
| 1068 | been done so we don't need to watch out for CRLF. |
| 1069 | |
| 1070 | """ |
| 1071 | newvalue = value.lstrip() |
| 1072 | fws = WhiteSpaceTerminal(value[:len(value)-len(newvalue)], 'fws') |
| 1073 | return fws, newvalue |
| 1074 | |
| 1075 | def get_encoded_word(value, terminal_type='vtext'): |
| 1076 | """ encoded-word = "=?" charset "?" encoding "?" encoded-text "?=" |
no test coverage detected
searching dependent graphs…