Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will work for "simple" things only because we're using a different regex engine.
But out of the 36 regular expressions, only the one for
application/x-dbf
fails.So I guess we're good?
I didn't even expect it to work this reliably tbh. 😉
And we can get rid of that html definition in
lib/marcel/mime_type/definitions.rb
now. 🎉Furthermore I hoped that this would also make #130 obsolete, because
looked pretty decent at first but a JS string with
html='<html><h1>';
will still trick it, right? 🤔While I'm generally happy with how it turned out, I would really love it if somebody has a better idea than switching
$VERBOSE
off and on again.Or we leave it and just accept the warnings?
I couldn't find anything nice to solve this better yet.
Anyway, this was a lot of fun to implement but I really should go to bed now. 😆
EDIT: So this is actually more complicated. I had failing runs on TruffleRuby and JRuby
EDIT2: okay, it looks like everything is running now on all the platforms. What a ride! 😆
/CC @tomhughes
PS: I'm looking for a new adventure in case anybody is looking for a Ruby/Rails/Crystal dev
PPS: would you be so kind and add the
hacktoberfest-accepted
label to this issue in case you find that PR helpful? 🥺