Skip to content

Commit 5bd5af6

Browse files
committed
FIX: simplified code using the new no-case parse's keyword
1 parent 00008ad commit 5bd5af6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mezz/codec-mime-field.reb

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ register-codec [
2424
][
2525
output: either binary? data [ copy data ][ to binary! data ]
2626
parse output [
27+
no-case ; binary input is by default case-sensitive
2728
any [
2829
to ch-crlf= [
2930
s: [#"^M" #"^/" | #"^/" #"^M" | #"^/"] some ch-space e: [
@@ -33,7 +34,8 @@ register-codec [
3334
|
3435
s: "=?" [
3536
copy chr: to #"?" skip
36-
[[#"q" | #"Q"] (enc: #"q") | [#"b" | #"B"] (enc: #"b")] #"?"
37+
; q and b bellow are handled as case-insensitive!
38+
[#"q" (enc: #"q") | #"b" (enc: #"b")] #"?"
3739
copy txt: to "?=" 2 skip
3840
;Any amount of linear-space-white between 'encoded-word's,
3941
;even if it includes a CRLF followed by one or more SPACEs,

0 commit comments

Comments
 (0)