packages feed

scalpel-core 0.5.0 → 0.5.1

raw patch · 4 files changed

+28/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,10 @@  ## HEAD +## 0.5.1++- Fix bug (#59, #54) in DFS traversal order.+ ## 0.5.0  - Split `scalpel` into two packages: `scalpel` and `scalpel-core`. The latter
scalpel-core.cabal view
@@ -1,5 +1,5 @@ name:                scalpel-core-version:             0.5.0+version:             0.5.1 synopsis:            A high level web scraping library for Haskell. description:     Scalpel core provides a subset of the scalpel web scraping library that is@@ -24,7 +24,7 @@ source-repository this   type:     git   location: https://github.com/fimad/scalpel.git-  tag:      v0.5.0+  tag:      v0.5.1  library   other-extensions:
src/Text/HTML/Scalpel/Internal/Select.hs view
@@ -219,8 +219,8 @@     | nodeMatches n info = (shrunkSpec :)                          $ selectNodes [n] (tags, fs, ctx)                          $ selectNodes [n] (tags, Tree.subForest f, ctx) acc-    | otherwise          = selectNodes [n] (tags, fs, ctx)-                         $ selectNodes [n] (tags, Tree.subForest f, ctx) acc+    | otherwise          = selectNodes [n] (tags, Tree.subForest f, ctx)+                         $ selectNodes [n] (tags, fs, ctx) acc     where         Span lo hi = Tree.rootLabel f         shrunkSpec = (
tests/TestMain.hs view
@@ -296,6 +296,26 @@                 index   <- position                 content <- text anySelector                 return (index, content))++    ,   scrapeTest+            "<div><p>p1</p><p>p2</p><blockquote><p>p3</p></blockquote><p>p4</p>"+            (Just ["p1", "p2", "p3", "p4"])+            (texts "p")++    ,   scrapeTest+            "<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"+            (Just ["1","2","3"])+            (texts "a")++    ,   scrapeTest+            "<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"+            (Just ["1","2","3"])+            (texts $ "a" // "b")++    ,   scrapeTest+            "<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"+            (Just ["1","2","3"])+            (texts "b")     ]  scrapeTest :: (Eq a, Show a) => String -> Maybe a -> Scraper String a -> Test