Den tors 19 jan. 2023 10:47Albert Krewinkel skrev: > Hi Isaac, > > Thanks for reaching out! > > Isaac Van Doren writes: > > > About Cooklang: > > I am interested in adding a reader to Pandoc for the Cook markdown > > language. Cooklang is a concise, standardized way to format recipes. > > Very interesting! I took a look at Cooklang, it has an appealing > tool-chain. > > > I've written a parser for Cook in Haskell which would be a good > > start. It complies with the official Cooklang canonical tests. > > > > Questions: > > Currently my parser uses Megaparsec. Do I need to refactor it to use > > Parsec instead or is it okay to add Megaparsec as a dependency? > > I believe that pandoc might switch to megaparsec at some point in the > future. But I'm afraid that as of now, the parser library should be > plain ol' parsec. > > > Currently my parser uses String instead of Text. Is it necessary for > > the parser to use Text to be used by Pandoc or could I get away with > > the reader converting its Text input to String when parsing? > > That's probably ok (and not too difficult to change/fix later on). > > > Is there anything else I should know before I start working on a PR? > > Does this seem like a suitable addition to Pandoc? > > I think it would be great to have this, but jgm will have to decide. > > If you don't want to wait and also like to play with new tools, then one > way to get fast results would be to write a parser with the LPeg Lua > library. Pandoc comes with a LPeg and a Lua interpreter included, For quick stuff the lpeg.re library may be easier than Lpeg proper. It supports grammars and is also included with pandoc. http://www.inf.puc-rio.br/~roberto/lpeg/re.html and > those can be used to write custom parsers. We've improved support for > this in pandoc 3, see . > > Cheers, > Albert > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/87lelzmn0l.fsf%40zeitkraut.de > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDv%2BS4he3Kr4sh4tUrw4CCmL6r1PJhLyUWazfx1-%3D0kJQ%40mail.gmail.com.