commonmark-extensions 0.2.0.1 → 0.2.0.2
raw patch · 6 files changed
+62/−9 lines, 6 filesdep ~commonmarkPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: commonmark
API changes (from Hackage documentation)
- Commonmark.Extensions: gfmExtensions :: (Monad m, Typeable m, IsBlock il bl, IsInline il, Typeable il, Typeable bl, HasEmoji il, HasStrikethrough il, HasPipeTable il bl, HasTaskList il bl, ToPlainText il) => SyntaxSpec m il bl
+ Commonmark.Extensions: gfmExtensions :: (Monad m, IsBlock il bl, IsInline il, HasEmoji il, HasStrikethrough il, HasPipeTable il bl, HasTaskList il bl, ToPlainText il) => SyntaxSpec m il bl
- Commonmark.Extensions.TaskList: taskListSpec :: (Monad m, Typeable m, IsBlock il bl, IsInline il, Typeable il, Typeable bl, HasTaskList il bl) => SyntaxSpec m il bl
+ Commonmark.Extensions.TaskList: taskListSpec :: (Monad m, IsBlock il bl, IsInline il, HasTaskList il bl) => SyntaxSpec m il bl
Files
- changelog.md +10/−0
- commonmark-extensions.cabal +2/−2
- src/Commonmark/Extensions.hs +2/−4
- src/Commonmark/Extensions/Footnote.hs +1/−1
- src/Commonmark/Extensions/TaskList.hs +1/−2
- test/footnotes.md +46/−0
changelog.md view
@@ -1,5 +1,15 @@ # Changelog for commonmark-extensions +## 0.2.0.2++- Remove unnecessary Typeable constraint on `TaskList` and+ `gfmExtensions` (#58).++- Fix bug in `footnote` extension: multiple blocks in+ a block container (e.g. block quote or list) inside+ a footnote were being rendered in reverse order (#63,+ Harald Gliebe).+ ## 0.2.0.1 - Added a missing test file to extra-source-files (#55).
commonmark-extensions.cabal view
@@ -1,5 +1,5 @@ name: commonmark-extensions-version: 0.2.0.1+version: 0.2.0.2 synopsis: Pure Haskell commonmark parser. description: This library provides some useful extensions to core commonmark@@ -55,7 +55,7 @@ , containers , transformers , parsec- , commonmark >= 0.1 && < 0.2+ , commonmark >= 0.1.1 && < 0.2 -- for extensions: , emojis >= 0.1 && < 0.2 exposed-modules:
src/Commonmark/Extensions.hs view
@@ -59,15 +59,13 @@ import Commonmark.Extensions.TaskList import Commonmark.Extensions.ImplicitHeadingReferences import Commonmark-import Data.Typeable #if !MIN_VERSION_base(4,11,0) import Data.Monoid ((<>)) #endif -- | Standard extensions for GitHub-flavored Markdown.-gfmExtensions :: (Monad m, Typeable m, IsBlock il bl, IsInline il,- Typeable il, Typeable bl, HasEmoji il,- HasStrikethrough il, HasPipeTable il bl,+gfmExtensions :: (Monad m, IsBlock il bl, IsInline il,+ HasEmoji il, HasStrikethrough il, HasPipeTable il bl, HasTaskList il bl, ToPlainText il) => SyntaxSpec m il bl gfmExtensions =
src/Commonmark/Extensions/Footnote.hs view
@@ -86,7 +86,7 @@ , blockConstructor = \node -> mconcat <$> mapM (\n -> blockConstructor (blockSpec (rootLabel n)) n)- (reverse (subForest node))+ (subForest (reverseSubforests node)) , blockFinalize = \(Node root children) parent -> do let (num, lab') = fromDyn (blockData root) (1, mempty) st <- getState
src/Commonmark/Extensions/TaskList.hs view
@@ -29,8 +29,7 @@ import Text.Parsec -taskListSpec :: (Monad m, Typeable m, IsBlock il bl, IsInline il,- Typeable il, Typeable bl, HasTaskList il bl)+taskListSpec :: (Monad m, IsBlock il bl, IsInline il, HasTaskList il bl) => SyntaxSpec m il bl taskListSpec = mempty { syntaxBlockSpecs = [taskListItemBlockSpec]
test/footnotes.md view
@@ -87,4 +87,50 @@ </section> ```````````````````````````````` +Ensure that nested blocks in footnotes are rendered in the+right order (#63). +```````````````````````````````` example+Hello[^test]++Footnote containing a list[^list]++[^test]:+ > first+ >+ > second+ >+ > third++[^list]:+ 1. First element+ 1. Second element+.+<p>Hello<sup class="footnote-ref"><a href="#fn-test" id="fnref-test">1</a></sup></p>+<p>Footnote containing a list<sup class="footnote-ref"><a href="#fn-list" id="fnref-list">2</a></sup></p>+<section class="footnotes">+<div class="footnote" id="fn-test">+<div class="footnote-number">+<a href="#fnref-test">1</a>+</div>+<div class="footnote-contents">+<blockquote>+<p>first</p>+<p>second</p>+<p>third</p>+</blockquote>+</div>+</div>+<div class="footnote" id="fn-list">+<div class="footnote-number">+<a href="#fnref-list">2</a>+</div>+<div class="footnote-contents">+<ol>+<li>First element</li>+<li>Second element</li>+</ol>+</div>+</div>+</section>+````````````````````````````````