You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I compared this with a few entries that do have extensions listed in src/iana-types.json and as opposed to the ones I looked at, these two MIME type definitions have their file extensions in a numbered list, e.g.
Additional information:
1. Deprecated alias names for this type: application/x-cbr
2. Magic number(s): none
3. File extension(s): .cbz
4. Macintosh file type code: N/A
5. Object Identifiers: N/A
(excerpt form vnd.comicbook+zip). I guess the parsing logic needs to be adjusted to match these, but I'm not good enough with JS to do that myself.
The text was updated successfully, but these errors were encountered:
Regexes make my brain hurt. However, I've figured out at least a few things.
The layout from my summary above could be parsed with an older regex /^\s*(?:\d\.\s+)?File extension(?:\(s\)|s|)\s?:\s+(?:\*\.|\.|)([0-9a-z_-]+)\s*(?:\(|$)/im, which was replaced in commit be9ca41 sometime in 2018.
Going by the new variable name and what I've seen, the old regex was not able to parse file extensions with quotes.
I've played around a bit with a regex tester and was able to fix some of these things. Making the quotes optional in particular is quite easy. But I'm very uncertain as to how this will affect a full rebuild. There doesn't seem to be a clear scheme to the IANA MIME type declarations, so I don't think there's a way to handle all cases anyway.
The two MIME types have clearly defined file extensions.
https://www.iana.org/assignments/media-types/application/vnd.comicbook+zip
https://www.iana.org/assignments/media-types/application/vnd.comicbook-rar
However, I compared this with a few entries that do have extensions listed in
src/iana-types.json
and as opposed to the ones I looked at, these two MIME type definitions have their file extensions in a numbered list, e.g.(excerpt form vnd.comicbook+zip). I guess the parsing logic needs to be adjusted to match these, but I'm not good enough with JS to do that myself.
The text was updated successfully, but these errors were encountered: