Closed mitchellwrosen closed 7 years ago
That is not intentional, I would have expected the the same ordering.
I cannot seem to reproduce this:
ghci> let html = "<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"
ghci> scrapeStringLike html $ texts "a"
Just ["1","2","3"]
ghci> scrapeStringLike html $ texts ("a" // "b")
Just ["1","2","3"]
Which version of scalpel are you using? Do you have a specific example that exhibits the problem?
the problem arises when you use the "b"
selector:
ghci> let html = "<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"
ghci> scrapeStringLike html $ texts (tagSelector "b")
Just ["3","2","1"]
It looks like this may be fixed with #59.
I just tried patching the proposed fix in #59 and it results in Just ["1","2","3"]
for all 3 cases.
This should now be fixed in v0.5.1.
Hi, I discovered that calling something like...
will match results in the opposite order as
(assuming that there is one
y
inside eachx
).Is this intended? Thanks!