hackage release

This package provides some syntax extensions for the commonmark package:


Changelog for commonmark-extensions


  • Make pipe_tables extension treat backslash escapes like GH does (#112, Michael Howell). This change essentially changes the way the text \\| gets parsed inside a table. In the old version, the first backslash escapes the second backslash, and then the pipe is treated as a cell separator. In the new version, the pipe is still preceded by a backslash, so it is still literal text. The escaping rule is documented in detail in the spec for this extension. This change also aligns our escaping of pipes with GitHub’s.

  • Fix pipe table parser so that |s don’t interfere with other block structures (Michael Howell, #111, fixing #52 and #95). This parser is structured as a system that parses the second line first, then parses the first line. That is, if it detects a delimiter row as the second line of a paragraph, it converts the paragraph into a table. This seems counterintuitive, but it works better than trying to convert a table into a paragraph, since it might need to be something else.

  • Improve parsing of inline math (#110).

  • Resolve entities inside wikilinks (#105, Michał Kukieła).

  • Require whitespace after definition list marker (#104). Otherwise we can inadvertently clobber strikeout or subscript.

  • Fix definition_lists extension (#96). We were not properly consuming indentation in definitions, which caused problems when the definitions themselves contained lists.

  • Update lower version bounds for commonmark (#93, David Thrane Christiansen).

  • math extension: don’t fail when display math contains embedded inline math. See jgm/pandoc#7942.
  • Make math parsing more sophisticated. Count embeddings inside {..}, since math can contain e.g. \text{...} which itself contains math delimiters.
  • Small improvement in pipe table parsing. The old parser failed on some edge cases with extra whitespace after pipes (which we should just ignore).
  • fancy_list extension: improve list type ambiguity resolution (#89).


  • Allow bare word attribute in fenced_divs (#84). This follows a similar change in pandoc (jgm/pandoc#7242).

  • Fix commonmark-extensions to build with GHC 9.2 (#81, Joseph C. Sible). Currently --allow-newer is needed.


  • Add footnote to gfmExtensions. Note that this also requires additional type constraints on gfmExtensions [API change].

  • Fix bug with absolute paths in rebase_relative_paths extension on Windows.

  • Fix bug in wikilinks extensions.


  • Add rebase_relative_paths extension. New exported module Commonmark.Extensions.RebaseRelativePaths [API change].
  • Add wikilinks_title_before_pipe and wikilinks_title_after_pipe extensions (#69). New exported module Commonmark.Extensions.Wikilinks [API change].

  • Add a test for autolinks (#66).
  • Require commonmark (otherwise autolinks don’t work properly).

  • Add some new test examples to the autolinks extension spec (#65).
  • Allow interior ~ characters in autolinks (#65).

  • 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).

  • Added a missing test file to extra-source-files (#55).

  • Add HasQuoted class in Smart extension, with singleQuoted and doubleQuoted methods. This gives more fleibility in supporting smart quotes, and allows us to use pandoc’s Quoted elements.

  • Add advice to haddocks for pipeTableSpec (#52). If a line could be a candidate pipe table heading, but the following line of separators is not encountered, the line is treated as a paragraph, even if it has indications of other block-level formatting. Putting the pipeTableSpec AFTER parsers for lists, headings, etc. causes the latter to take priority.

  • Initial release