-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version string of filter is truncated if it not composed only of digits #16
Comments
I added this code to address the issue, 6fec1a3:
Ideally, this should be the parser
|
@qrilka If you have a moment, I have a educational Haskell question I’ve been unable to tackle. We would like to parse version numbers like The original code’s parser used I thought that the obvious fix would be to replace Why doesn’t the |
@essandess I'm not sure I understand your point about "not work" here - |
Thanks again for the Haskell n00b pointers @qrilka! What I mean is that the code fragment -- versionnumber = many1 digit -- this compiles!
versionnumber = many1 digit `sepBy` char ‘.’ -- this doesn't compile!!!
-- versionnumber = (++) <$> many1 digit `sepBy` char ‘.’ -- this doesn't compile either!!!
versionParser = (\x -> info{_version = read x}) <$> (string "Version: " *> versionnumber) What's the correct
Just to keep it simple, I'd like to parse the string alone, and ignore that fact that it is comprised of things that could be cast as In Python, this would be something like |
@qrilka Thanks again for the pointer. I got it: intercalate "." <$> many1 digit `sepBy` char '.' |
I didn't write anything here today :)
|
This may be trivial, but in case it is somehow connected to #15 seems wise to report it as well
adblock_anty-dotacje.txt version is
100.2
and adblock2privoxy allows only digits. As the result it truncates the version to100
adblock_adguard.txt current version is
364.2
and result in file is364
EDIT: Looking at the source version number is treated as Integer which must be a whole number. Probably switching here to floating point is required to accept digits after dot.
The text was updated successfully, but these errors were encountered: