Fix RE_UNTAGGED regex not picking up highestmodseq

fork
Eric Zhang 11 years ago
parent 44ab3b81f7
commit 0dcffb816b

@ -15,7 +15,7 @@ var CH_LF = 10,
RE_SEQNO = /^\* (\d+)/,
RE_LISTCONTENT = /^\((.*)\)$/,
RE_LITERAL = /\{(\d+)\}$/,
RE_UNTAGGED = /^\* (?:(OK|NO|BAD|BYE|FLAGS|ID|LIST|LSUB|SEARCH|STATUS|CAPABILITY|NAMESPACE|PREAUTH|SORT|THREAD|ESEARCH|QUOTA|QUOTAROOT)|(\d+) (EXPUNGE|FETCH|RECENT|EXISTS))(?: (?:\[([^\]]+)\] )?(.+))?$/i,
RE_UNTAGGED = /^\* (?:(OK|NO|BAD|BYE|FLAGS|ID|LIST|LSUB|SEARCH|STATUS|CAPABILITY|NAMESPACE|PREAUTH|SORT|THREAD|ESEARCH|QUOTA|QUOTAROOT)|(\d+) (EXPUNGE|FETCH|RECENT|EXISTS))(?:(?: \[([^\]]+)\])?(?: (.+))?)?$/i,
RE_TAGGED = /^A(\d+) (OK|NO|BAD) (?:\[([^\]]+)\] )?(.+)$/i,
RE_CONTINUE = /^\+(?: (?:\[([^\]]+)\] )?(.+))?$/i,
RE_CRLF = /\r\n/g,
@ -799,7 +799,7 @@ function decodeBytes(buf, encoding, offset, mlen, state) {
return;
} else if (isPartial) {
// RFC2047 says that each decoded encoded word "MUST represent an integral
// number of characters. A multi-octet character may not be split across
// number of characters. A multi-octet character may not be split across
// adjacent encoded-words." However, some MUAs appear to go against this,
// so we join broken encoded words separated by linear white space until
// we can successfully decode or we see a change in encoding

Loading…
Cancel
Save