packages feed

pandoc-include-code 1.1.1.0 → 1.2.0.0

raw patch · 4 files changed

+26/−16 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog +* **1.2.0.0**+  - Move `Range` to its own module (hiding the constructor)+  - Setup automated release builds using Travis. Executables for Linux+    and macOS now get published at+    https://github.com/owickstrom/pandoc-include-code/releases. * **1.1.1.0**   - Loosen constraint on `pandoc-types` to include `1.19`. * **1.1.0.0**
pandoc-include-code.cabal view
@@ -7,8 +7,8 @@   together with preformatted HTML-like sources, in Pandoc. author:              Oskar Wickström maintainer:          Oskar Wickström-homepage:	           https://github.com/owickstrom/pandoc-include-code-version:             1.1.1.0+homepage:	     https://github.com/owickstrom/pandoc-include-code+version:             1.2.0.0 cabal-version:       >= 1.8 build-type:          Simple category:            Documentation@@ -23,6 +23,7 @@ library     hs-source-dirs:  src     exposed-modules: Text.Pandoc.Filter.IncludeCode+                     Text.Pandoc.Filter.Range     build-depends:   base                 >= 4        && < 5                    , unordered-containers >= 0.2      && < 0.3                    , process
src/Text/Pandoc/Filter/IncludeCode.hs view
@@ -17,22 +17,17 @@  import           Control.Monad.Except import           Control.Monad.Reader-import           Data.Char            (isSpace)-import           Data.HashMap.Strict  (HashMap)-import qualified Data.HashMap.Strict  as HM-import           Data.List            (isInfixOf)-import           Data.Text            (Text)-import qualified Data.Text            as Text-import qualified Data.Text.IO         as Text+import           Data.Char                (isSpace)+import           Data.HashMap.Strict      (HashMap)+import qualified Data.HashMap.Strict      as HM+import           Data.List                (isInfixOf)+import           Data.Text                (Text)+import qualified Data.Text                as Text+import qualified Data.Text.IO             as Text import           Text.Pandoc.JSON-import           Text.Read            (readMaybe)--data Range = Range Int Int+import           Text.Read                (readMaybe) -mkRange :: Int -> Int -> Maybe Range-mkRange s e-  | s > 0 && e > 0 && s <= e = Just (Range s e)-  | otherwise = Nothing+import           Text.Pandoc.Filter.Range (Range, mkRange)  data InclusionSpec = InclusionSpec   { include :: FilePath
+ src/Text/Pandoc/Filter/Range.hs view
@@ -0,0 +1,9 @@+-- | A range that cannot be constructed with incorrect bounds.+module Text.Pandoc.Filter.Range (Range, mkRange) where++data Range = Range Int Int++mkRange :: Int -> Int -> Maybe Range+mkRange s e+  | s > 0 && e > 0 && s <= e = Just (Range s e)+  | otherwise = Nothing