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
{{ message }}
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.
Premailer has some other options, some only for Nokogiri, but since hprikot is no longer maintained that looks like the way to go.
Can you remove the option check and pass all options directly to premailer, or only the options that are not grunt-premailer specific?
this way you don't have to update the project every premailer adds a new option
The text was updated successfully, but these errors were encountered:
ATM the task just parses passed in options to arguments which are then passed to a ruby script.
Inside the ruby script I'm using OptionParser to convert them back to a ruby hash.
For what i can understand (not a ruby dev) OptionParser needs options to be specified in it's configuration, so I don't know if it's possibile to pass in unknown options.
Hi @dwightjack ,
Love having grunt-premailer but am really missing the escapeUrlAttributes option. Did some quick searching around and apparently you can pass unknown options with OptionParser. I know very little about Ruby but hopefully this helps. Thread: https://www.ruby-forum.com/topic/88081
And the code is:
unknown=[] #this is the array where the unknown options will be put
begin
option_parser.parse! argv
rescue OptionParser::InvalidOption => e
e.recover argv
#recover just put the unknown option back into argv, so I extract it
again and put it into unknown
unknown << argv.shift
#if argv still contains some elements, and the first one doesn't start
with a -, i.e is the argument for the unknown option, I remove it as
well
unknown << argv.shift if argv.size>0 and temp.first[0..0]!='-'
# go on with parsing
retry
end
puts unknown
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Premailer has some other options, some only for Nokogiri, but since hprikot is no longer maintained that looks like the way to go.
Can you remove the option check and pass all options directly to premailer, or only the options that are not grunt-premailer specific?
this way you don't have to update the project every premailer adds a new option
The text was updated successfully, but these errors were encountered: