packages feed

pandoc-include-code 1.2.0.0 → 1.2.0.1

raw patch · 4 files changed

+16/−7 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,7 @@ # Changelog +* **1.2.0.1**+  - Fix compile error * **1.2.0.0**   - Move `Range` to its own module (hiding the constructor)   - Setup automated release builds using Travis. Executables for Linux
pandoc-include-code.cabal view
@@ -8,7 +8,7 @@ author:              Oskar Wickström maintainer:          Oskar Wickström homepage:	     https://github.com/owickstrom/pandoc-include-code-version:             1.2.0.0+version:             1.2.0.1 cabal-version:       >= 1.8 build-type:          Simple category:            Documentation
src/Text/Pandoc/Filter/IncludeCode.hs view
@@ -27,7 +27,7 @@ import           Text.Pandoc.JSON import           Text.Read                (readMaybe) -import           Text.Pandoc.Filter.Range (Range, mkRange)+import           Text.Pandoc.Filter.Range (Range, mkRange, rangeEnd, rangeStart)  data InclusionSpec = InclusionSpec   { include :: FilePath@@ -91,9 +91,9 @@ filterLineRange :: Lines -> Inclusion Lines filterLineRange ls =   asks range >>= \case-    Just (Range start end) ->-      return (take (end - startIndex) (drop startIndex ls))-      where startIndex = pred start+    Just range ->+      return (take (rangeEnd range - startIndex) (drop startIndex ls))+      where startIndex = pred (rangeStart range)     Nothing -> return ls  isSnippetTag :: Text -> Text -> Text -> Bool
src/Text/Pandoc/Filter/Range.hs view
@@ -1,7 +1,14 @@ -- | A range that cannot be constructed with incorrect bounds.-module Text.Pandoc.Filter.Range (Range, mkRange) where+module Text.Pandoc.Filter.Range+  ( Range+  , rangeStart+  , rangeEnd+  , mkRange+  ) where -data Range = Range Int Int+data Range = Range { rangeStart :: Int+                   , rangeEnd   :: Int+                   }  mkRange :: Int -> Int -> Maybe Range mkRange s e