public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Progress report: pure Haskell commonmark parser
@ 2019-07-12 16:06 John MacFarlane
       [not found] ` <m2h87r6xum.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2019-07-12 16:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


For some time, I've been working on a pure Haskell commonmark
parser that aims to support pandoc extensions:

https://github.com/jgm/commonmark-hs

When it is finished, my idea is to use it to replace pandoc's
markdown reader.  This will improve performance and compatibility
and fix a number of longstanding bugs, including performance
bugs.  The library is easy to extend and has minimal
dependencies. I'm hoping that eventually it could be used
for rendering on Hackage and a markdown extension in haddock.

Currently I've finished the core and the following extensions:

- pipe_tables
- smart
- strikethrough
- math
- emoji
- autolinks
- footnotes
- definition_lists
- attributes
- raw_attribute
- bracketed_spans
- fenced_divs
- auto_identifiers
- implicit_heading_references

If any developers are interested in helping out, we still need
to implement the following:

- subscript
- superscript
- fancy_lists
- example_lists
- implicit_figures
- line_blocks
- task_lists
- yaml_metadata_block (probably in separate package to avoid yaml dependency)
- pandoc_title_block
- citations
- simple tables
- multiline tables
- grid tables

If you want to contribute, have a look at the code and I'd be
happy to answer questions.  I'm also keen to simplify the current
code, and to improve performance, so ideas there are also welcome.

John


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Progress report: pure Haskell commonmark parser
       [not found] ` <m2h87r6xum.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-07-12 21:07   ` Kolen Cheung
       [not found]     ` <2451db2f-c0c0-4195-bac6-d81cfc21a291-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Kolen Cheung @ 2019-07-12 21:07 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1313 bytes --]

Hi,

I've a question on the transition. Would the current parser be available as 
an alternative for some time? One obvious thing people might want to do is 
to convert from original pfm to new one (there must be some subtle 
differences on how it parses.) Kind of like what GitHub did to convert all 
their markdown in GitHub issues. May be something like a v2.n where the new 
parser is optional, and the old parser with a deprecation notice. v2.(n+1) 
is new parser default, old one optional. v3 drops support of old parser?

Another question is if a spec of the pandoc-extended CommonMark is going to 
be released, following the CommonMark spec? This could facilitate people 
writing pandoc compliant markdown parser in other languages.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2451db2f-c0c0-4195-bac6-d81cfc21a291%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1769 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Progress report: pure Haskell commonmark parser
       [not found]     ` <2451db2f-c0c0-4195-bac6-d81cfc21a291-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-07-12 21:57       ` John MacFarlane
  0 siblings, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2019-07-12 21:57 UTC (permalink / raw)
  To: Kolen Cheung, pandoc-discuss


Yes, I think we'd keep the legacy parser around as an alternative
for a while.  Don't know about the spec, but I'm trying to write
up syntax descriptions and some example test cases for each
extension, in the style of the spec.

Kolen Cheung <christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi,
>
> I've a question on the transition. Would the current parser be available as 
> an alternative for some time? One obvious thing people might want to do is 
> to convert from original pfm to new one (there must be some subtle 
> differences on how it parses.) Kind of like what GitHub did to convert all 
> their markdown in GitHub issues. May be something like a v2.n where the new 
> parser is optional, and the old parser with a deprecation notice. v2.(n+1) 
> is new parser default, old one optional. v3 drops support of old parser?
>
> Another question is if a spec of the pandoc-extended CommonMark is going to 
> be released, following the CommonMark spec? This could facilitate people 
> writing pandoc compliant markdown parser in other languages.
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2451db2f-c0c0-4195-bac6-d81cfc21a291%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-12 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 16:06 Progress report: pure Haskell commonmark parser John MacFarlane
     [not found] ` <m2h87r6xum.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-07-12 21:07   ` Kolen Cheung
     [not found]     ` <2451db2f-c0c0-4195-bac6-d81cfc21a291-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-12 21:57       ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).