summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkivikakk <>2019-03-14 02:39:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-03-14 02:39:00 (GMT)
commitba9395c0fe3001c4e41415c344805f4ecea3f122 (patch)
tree66c1bbdcec5afad519e3ad8b0f63669d1ff400d4
parent406ccb5439a71039b26272b5d74405679f6d88eb (diff)
version 0.1.8HEAD0.1.8master
-rw-r--r--CMarkGFM.hsc4
-rw-r--r--changelog26
-rw-r--r--cmark-gfm.cabal8
3 files changed, 26 insertions, 12 deletions
diff --git a/CMarkGFM.hsc b/CMarkGFM.hsc
index 45ed7a9..0fcb6d3 100644
--- a/CMarkGFM.hsc
+++ b/CMarkGFM.hsc
@@ -43,7 +43,7 @@ import Data.Maybe (fromMaybe)
import GHC.Generics (Generic)
import Data.Data (Data)
import Data.Typeable (Typeable)
-import Data.Text (Text, empty)
+import Data.Text (Text, empty, snoc)
import qualified Data.Text.Foreign as TF
import Data.ByteString.Unsafe (unsafePackMallocCString)
import Data.Text.Encoding (decodeUtf8)
@@ -492,7 +492,7 @@ totext str
| otherwise = TF.peekCStringLen (str, c_strlen str)
withtext :: Text -> (CString -> IO a) -> IO a
-withtext t f = TF.withCStringLen t (f . fst)
+withtext t f = TF.withCStringLen (snoc t '\0') (f . fst)
foreign import ccall "string.h strlen"
c_strlen :: CString -> Int
diff --git a/changelog b/changelog
index 4ce0412..0fdc8f7 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,17 @@
+cmark-gfm 0.1.8 (14 Mar 2019)
+
+ * Pull in upstream changes.
+
+cmark 0.5.6.3 (13 Mar 2019)
+
+ * Use snoc instead of <> to add the null terminator.
+
+cmark 0.5.6.2 (13 Mar 2019)
+
+ * Ensure that withtext adds a null terminator (#14).
+ This fixes a regression due to PR #13, which caused
+ random content to appear in rendered TEXT nodes.
+
cmark-gfm 0.1.7 (13 Mar 2019)
* Update to cmark-gfm 0.28.3.gfm.20.
@@ -5,14 +19,14 @@ cmark-gfm 0.1.7 (13 Mar 2019)
cmark 0.5.6.1 (11 Mar 2019)
* Fix CString memory leaks (Anders Kaseorg). The renderer functions return
- a malloc’d string which the caller is expected to free.
+ a malloc’d string which the caller is expected to free.
* Fix use-after-free bugs (Anders Kaseorg). `useAsCString` frees the
- CString after the IO action finishes executing, so passing `return` as that
- action can never be correct. To make sure the CString gets freed at the
- right time, we need a “with”-style abstraction, not just a conversion
- function. While we’re here replace this with `withCStringLen`, which also
- makes fewer copies.
+ CString after the IO action finishes executing, so passing `return` as
+ that action can never be correct. To make sure the CString gets freed
+ at the right time, we need a “with”-style abstraction, not just a
+ conversion function. While we’re here replace this with
+ `withCStringLen`, which also makes fewer copies.
* Show node type on error for unknown node type.
diff --git a/cmark-gfm.cabal b/cmark-gfm.cabal
index 2c3ba9c..080b852 100644
--- a/cmark-gfm.cabal
+++ b/cmark-gfm.cabal
@@ -1,12 +1,12 @@
name: cmark-gfm
-version: 0.1.7
+version: 0.1.8
synopsis: Fast, accurate GitHub Flavored Markdown parser and renderer
description:
This package provides Haskell bindings for
<https://github.com/github/cmark-gfm libcmark-gfm>, the reference
parser for <https://github.github.com/gfm/ GitHub Flavored Markdown>, a fully
specified variant of Markdown. It includes sources for
- libcmark-gfm (0.28.0) and does not require prior installation of the
+ libcmark-gfm (0.28.3.gfm.20) and does not require prior installation of the
C library.
homepage: https://github.com/kivikakk/cmark-gfm-hs
@@ -14,7 +14,7 @@ license: BSD3
license-file: LICENSE
author: Ashe Connor
maintainer: kivikakk@github.com
-copyright: (C) 2015--17 John MacFarlane, (C) 2017 Ashe Connor
+copyright: (C) 2015--17 John MacFarlane, (C) 2017--19 Ashe Connor
category: Text
tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.2, GHC == 7.10.3
build-type: Simple
@@ -57,7 +57,7 @@ extra-source-files: README.md
cbits/footnotes.h
bench/sample.md
bench/full-sample.md
-cabal-version: >=1.14
+cabal-version: 1.14
Source-repository head
type: git