aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deb/stack.yaml2
-rw-r--r--osx/stack.yaml2
-rw-r--r--pandoc.cabal4
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs9
-rw-r--r--stack.yaml2
-rw-r--r--windows/stack.yaml2
6 files changed, 14 insertions, 7 deletions
diff --git a/deb/stack.yaml b/deb/stack.yaml
index 8b1e64ec0..5b3eadf36 100644
--- a/deb/stack.yaml
+++ b/deb/stack.yaml
@@ -16,4 +16,6 @@ packages:
extra-deps:
- data-default-0.6.0
- pandoc-citeproc-0.10
+- http-client-0.5.0
+- http-client-tls-0.3.0
resolver: lts-6.5
diff --git a/osx/stack.yaml b/osx/stack.yaml
index ac438d1a2..5c9dc607e 100644
--- a/osx/stack.yaml
+++ b/osx/stack.yaml
@@ -19,4 +19,6 @@ packages:
extra-deps:
- 'pandoc-citeproc-0.10'
- 'data-default-0.6.0'
+- 'http-client-0.5.0'
+- 'http-client-tls-0.3.0'
resolver: lts-6.5
diff --git a/pandoc.cabal b/pandoc.cabal
index 3976eddca..dbb9a925f 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -300,8 +300,8 @@ Library
else
Build-Depends: network >= 2 && < 2.6
if flag(https)
- Build-Depends: http-client >= 0.3.2 && < 0.5,
- http-client-tls >= 0.2 && < 0.3,
+ Build-Depends: http-client >= 0.5 && < 0.6,
+ http-client-tls >= 0.3 && < 0.4,
http-types >= 0.8 && < 0.10
cpp-options: -DHTTP_CLIENT
if flag(embed_data_files)
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index 023afe6e1..0bd82ce2f 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
-{-# OPTIONS_GHC -fno-warn-overlapping-patterns #-}
+{-# LANGUAGE ViewPatterns #-}
{-
Copyright (C) 2014-2016 Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
@@ -54,7 +54,6 @@ import Data.Char ( isSpace, toLower, toUpper)
import Data.List ( foldl', intersperse, isPrefixOf )
import qualified Data.Map as M
import Data.Maybe ( fromMaybe, isNothing )
-import qualified Data.Sequence as S
import Network.HTTP ( urlEncode )
--
@@ -142,7 +141,7 @@ headlineToBlocks hdln@(Headline {..}) = do
_ | any isArchiveTag headlineTags -> archivedHeadlineToBlocks hdln
_ | isCommentTitle headlineText -> return mempty
_ | headlineLevel >= maxHeadlineLevels -> headlineToHeaderWithList hdln
- _ -> headlineToHeaderWithContents hdln
+ _ | otherwise -> headlineToHeaderWithContents hdln
isNoExportTag :: Tag -> Bool
isNoExportTag = (== toTag "noexport")
@@ -154,8 +153,8 @@ isArchiveTag = (== toTag "ARCHIVE")
-- FIXME: This accesses builder internals not intended for use in situations
-- like these. Replace once keyword parsing is supported.
isCommentTitle :: Inlines -> Bool
-isCommentTitle xs = (B.Many . S.take 1 . B.unMany) xs == B.str "COMMENT"
-isCommentTitle _ = False
+isCommentTitle (B.toList -> (Str "COMMENT":_)) = True
+isCommentTitle _ = False
archivedHeadlineToBlocks :: Headline -> OrgParser Blocks
archivedHeadlineToBlocks hdln = do
diff --git a/stack.yaml b/stack.yaml
index 62bf29b1e..4af30de8f 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -9,4 +9,6 @@ packages:
- '.'
extra-deps:
- data-default-0.6.0
+- http-client-0.5.0
+- http-client-tls-0.3.0
resolver: lts-6.5
diff --git a/windows/stack.yaml b/windows/stack.yaml
index 011dfb4c9..eb96c862f 100644
--- a/windows/stack.yaml
+++ b/windows/stack.yaml
@@ -16,4 +16,6 @@ packages:
extra-deps:
- 'data-default-0.6.0'
- 'pandoc-citeproc-0.10'
+- 'http-client-0.5.0'
+- 'http-client-tls-0.3.0'
resolver: lts-6.5