From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23123 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Progress report: pure Haskell commonmark parser Date: Fri, 12 Jul 2019 09:06:57 -0700 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="148296"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBL7AULUQKGQEL5DPMRA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jul 12 18:07:19 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f189.google.com ([209.85.167.189]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hly4n-000cHB-G9 for gtp-pandoc-discuss@m.gmane.org; Fri, 12 Jul 2019 18:07:13 +0200 Original-Received: by mail-oi1-f189.google.com with SMTP id h184sf4347113oif.16 for ; Fri, 12 Jul 2019 09:07:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1562947632; cv=pass; d=google.com; s=arc-20160816; b=TtnSCRMKvol+ml8LFKCpI/E3tTv0CM7+xE0E9qF87F04DexdSr02yHpW3alr9PqG6w BWH6q4L4Ic7D0mZIhjor+MAgXxuHLAybIHQsgbDTPunfqKU7oZR6isuDK+48fP2M8XWS fmkwlSbkI82PHRnVrFkzXTPbx2k1V89KXZrxKa5XFUp+pUXH6/zVqGFcdS+PRjloBwkj cCe84lh2EVqJx6UIDzgP6KaxO1Z+PlGJ5vM13eDLBx3l14QKSTmiYWlSVItGBr4Mid+U dUmiPHwfa9usFGVerWruNn+j1AnXPKgYkpmYYVPRAti84QyINgEj0JnfQN0WcmWF+rRr ji5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:subject:to:from:sender:dkim-signature; bh=bNM3AxcFKQqZrCedSFXZIT0t1WoD4HOy9ivh5fvWw6g=; b=H8idXbZwTd4JXY8HkqzEj1nBixwB4/bJvTDTOWZUcUlzuXq/wrCLmTIY7hjwLbC6I5 IALRJ1BFx6EA/SERey/PCDAsolwYbRDEmwnC+yomyJNf9wnP1jak4x1SvWQirhlODuPy f+PeeesKaTNvth+LxmI9XIu+6Tm6kWIJYvPfsr+bzix5FV/ApDBu4ybU8IO859/vIWul 4b/7hqSscSHhWliJq2XESmjzrHZqDIYjBzOSnZln/cucsH9aOrjbGgj7qxG8QioW1KTs sRdZpjxiJiyfG6V00Qo5QFlpym2WVdyAFXqOSj2hBVX6UbSdzl43xXxXbBAEFEUnVuIt t7SA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=jrqJZ2iW; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::530 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=bNM3AxcFKQqZrCedSFXZIT0t1WoD4HOy9ivh5fvWw6g=; b=GQ3D6UZmO96mjJk4WndBfUMi1CWhY/wo0ItLiN7fXV0D9rd6OsGFGUVpBR2FMgA57z NViook1KhLrTRyBu8G+Xeiid5VvcKgZ+dxuBmhCmw20Z24wcDYVrgEzaAa9GEk4IWV+f GjKweKr9xGwqbtYMoWdVBkdtuC8R/H2+ORpIFMx6huN/ijJA2dMfq6jLHZdCBRSC6Ut+ OjQv1HyraSsn9/aqIb3EoWAnZqtVyTd0tLVLRvV5nP6Ibta09sLNizXqqRq/GMzzrOei 8APTGqUTCZNmtEjY+zLDIErUawbynQX9Q9AeUQy5bmEXcDdKA77rfv6tSadJl8jJHipP Chrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=bNM3AxcFKQqZrCedSFXZIT0t1WoD4HOy9ivh5fvWw6g=; b=m6zfVAcX/mWGR0ouwxBrdDY4IZcMHwaY6s8GUp6W4tYYeMUtvNZ4jUc+1qXcGGbkYh 0ZST1jWGlvQgXOrVhlaCtIbGGPtdemCGGPmqk8WxMEyJ4AJZ/m3miho5NJEX1TM9jIW8 9KJAUGV2FFBLAZWC43L0R1IsrCl2H86oeoqtzw2UzbwfCTWVxBJZEhJ2q6tjG2AcTgIx vsUQF4rZy4phc04XG3EMbhw5QuX1ywsvm2pxvQQzmPut+olhKtHrtwGJo1YFO0gHKAfy Bwk5FukqUkF5Hv5IZ7hC1HVinAVEm7JSiqsmlSn/ZfIXjp9jnFOhHoZerdq6cLT3XAsL 0Ovw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWbx7MJ/mhk7ZjZpbmLAwvHg4KTIwu4f5T7P7864JqomvRaJYJP WZFfSx27/k+DUc+39WK+3gs= X-Google-Smtp-Source: APXvYqz2JPa0XRlrWnPhWX/OQlPb7vFTq9tSBA3jFL9CpjgKciVIERy1v/AdsFtJsM6Kz/AKRgF1zQ== X-Received: by 2002:a05:6830:211a:: with SMTP id i26mr8864722otc.15.1562947632088; Fri, 12 Jul 2019 09:07:12 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:5d4:: with SMTP id d20ls1403752oij.14.gmail; Fri, 12 Jul 2019 09:07:11 -0700 (PDT) X-Received: by 2002:aca:1c11:: with SMTP id c17mr6248621oic.170.1562947631113; Fri, 12 Jul 2019 09:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562947631; cv=none; d=google.com; s=arc-20160816; b=xWMbafJxOAYZbP6q/87n3YSBkXElMEM1Xc4m8E6usnyunBNMWs974vV+8qQ8G+u3zd AKGnUrLykc5VqBRlzlQDWWd1f8yUn5aqzv8g/yW+rwA1AplTk0qjOQg09WDgtMMFB28N 0CpGXqCq1DMTAPu+WLPvTEyBubiSL+/dkG1au7JZdRncuhe4yaWba0iPWmceCA12qdda hKkDCazb/nXR0f7jduIkaCzTUYe4u8jCrIimduibC8BxRsBu/yTlC2LfPmg5zpv7h7Dx VHMPLViOsl3Hp5JWOuJvISrgsG8SR6kJRWv9X/Q3lvjwW0jcOHgIG098RuHTy5mV1Mmo yTHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:to:from:dkim-signature; bh=H9ZjltJGF6YHr0yWu+nCWd1HIYK/pMqPAsRdhvIlC8Y=; b=oPqOF+dphyBELee3KF6LEI8zYwgOmyV8pupJ9809Z+k4x+1fUFnt3jQxpqJveByn7m FcdMEppqd85mImOCZkLIVi0VzlRQXFVoamG/gn7YYLZuqQQMY3sOHDQMg+a/Ht6qU6b4 RyMNmTdlu4IaADiKKX0R3lWB2B8HHkwgKqes7ol41Kn8+cGjkS/JHy2u8qXNzRlD3LkP 8gUl0925K5dQbEqc/nnQya0JoAkAxRPQy3xmR6yWbVg9wyDW6kAS9I9Lif+KQaSyTOjb m5ycK5j/+HY9GeI08MQP4amM21v3Cf+UIG4sinV1geO5Ndh1lJi3kpGyLSPpv2NHjOmW ruIQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=jrqJZ2iW; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::530 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com. [2607:f8b0:4864:20::530]) by gmr-mx.google.com with ESMTPS id n27si474465otj.1.2019.07.12.09.07.11 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2019 09:07:11 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::530 as permitted sender) client-ip=2607:f8b0:4864:20::530; Original-Received: by mail-pg1-x530.google.com with SMTP id w10so4734348pgj.7 for ; Fri, 12 Jul 2019 09:07:11 -0700 (PDT) X-Received: by 2002:a65:6294:: with SMTP id f20mr11947434pgv.349.1562947630002; Fri, 12 Jul 2019 09:07:10 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id 21sm8733895pjh.25.2019.07.12.09.07.09 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 12 Jul 2019 09:07:09 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 4CACEA255; Fri, 12 Jul 2019 12:06:58 -0400 (EDT) X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=jrqJZ2iW; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::530 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:23123 Archived-At: 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