commonmark-hs
commonmark-hs copied to clipboard
Pure Haskell commonmark parsing library, designed to be flexible and extensible
( Lifted from - https://github.com/haskell/hackage-server/issues/1105 ) Rendering ```md - foo - `a|b` - bar ``` with `gfmExtensions` included in the parser gives this: foo - a|b bar rather than this:...
Fixes #91 by escaping filenames. I think technically we would only have to escape `-` and `%`, but I escaped all of the special syntax to avoid inconsistency.
For admittedly uncommon filenames & degenerate ranges there is ambiguity in the implementation of `show :: SourceRange -> String`. Consider the following two examples: ``` λ> import Text.Parsec.Pos λ> show...
I've recently embedded this library in my tool to generate my [blog](https://lucasdicioccio.github.io/how-this-blog-works.html) and I find it pretty cool as a user. So first-of all thanks. Some context, the sort of...
Instead of a list of [FormattingSpec], let's have a FormattingSpecMap. Define Monoid for this so that if you have two formatting specs for the same character, one a single-matcher and...
As in pandoc: https://pandoc.org/MANUAL.html#extension-citations Implement in commonmark-core, commonmark-cli, commonmark-pandoc. This is tricky: we need to make sure this comes first in bracketed specs to avoid interpretation as a span.
**Explain the problem.** ``` $ printf '{x=3}' | pandoc -f commonmark+attributes -t native [] $ printf 'hello\n\n{x=3}' | pandoc -f commonmark+attributes hello ``` If there is nothing the attribute belongs...
This is one of differences from Pandoc's markdown. It is part of the [`header_attributes` extension](https://pandoc.org/MANUAL.html#extension-header_attributes)
In [TailwindCSS](https://tailwindcss.com/), we have CSS class names like [`w-1/2`](https://tailwindcss.com/docs/width#class-reference) which trip up the fenced div parser. Example, ```markdown :::{.w-1/2} Hello world ::: ``` A potential fix is to add `/`...
Basically a port of https://github.com/jgm/pandoc/pull/7242 to support simpler div's like this: ```markdown :::warning This project is a *work in progress*. ::: ```