From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24450 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Adding the highlight directive to the rST reader Date: Thu, 13 Feb 2020 08:29:17 -0800 Message-ID: References: <9e025799-6d50-40a9-b8ab-a075437cb2b9@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="68607"; mail-complaints-to="usenet@ciao.gmane.io" To: Lucas Escot , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB2XSSXZAKGQE45ISQMI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Feb 13 17:29:36 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f57.google.com ([209.85.216.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j2HMt-000Hdu-G2 for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 13 Feb 2020 17:29:35 +0100 Original-Received: by mail-pj1-f57.google.com with SMTP id e4sf3820720pjj.9 for ; Thu, 13 Feb 2020 08:29:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581611374; cv=pass; d=google.com; s=arc-20160816; b=DvMuJPImvQIeROjWqGJ36vSnEmDqra6RI57MDUq+mvmn+B2VyOkDvENKdm/CfFGQYL Od0AU4hgj27ma5IRUKuGTgnvWNTR9I/TxWJvR+3O9G94vkDGwxi02Jc2RgFQYwNNutBB BfR9Rt8gVCllIwy67Xaiy4pySTy5kiAn/oEqyQZJqHbYkHBeqv+yD7T2e5NRMIVaJbdh 439nsSGhtaKYionnRwTQZx4Znnm5G/CgXjN0iLFnpkFKm5EyNe2s00zRvSXpeK80H1Cu ctAGPmguixyYp7vSjvEDGmvqtajRKznV1+1p7HlnTgfrdVcwxymGXysv6W2XwzadABuz 6uAw== 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:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=YrKCXfvFHTehNH4HWt4TrPoWHvMJeGeaiAbgtWPthgU=; b=QBiqoqGmtOuk773Y0db6vrBpYlJzau19tY/MR+BvEql6SUvfpvrann9mEuKMxY/7cH nA7KoqcsyJ5CkhTapId4sCwbCwR3m7frDexm/2aQax4DHz6Aq1lyG6J7i3x7nSb8xElF v/W+q19QT+Utyi/l9VXzsC2Psxo697Br9r7OsMJr8Kz05QhvOUCCHS/ujaG8JRL5e+u/ 7E1v3j688zWzuzTuzjc2t2yrHnBpDKTsuPi/tXXmcrYAWlBRefnjqQO7F/guh/z0SZft cXjCce+oJ9l3VMAjkf39mxU0wLdqJcoCN/SmSikDIvo+Cn5XXC3YyAsoBfbTMrD5cuzN g8zg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=kdSZaUIB; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::531 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:in-reply-to:references: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=YrKCXfvFHTehNH4HWt4TrPoWHvMJeGeaiAbgtWPthgU=; b=SnOCMcvZfDi5SH5nBeMTxGCgKCPUsMxks6keXxVH82+7xugu0uJyGK88bDIQAlzolM nCO8WAQJvjCphw2fH7BFzdiSQRp51tYq3Hq7avzf7m5WGp4PDNYArLF/77Tvlav0+it3 Ddv2Uam/nbENVr8thVK0qAbdu8pvVeU8lgGSZFzxsvpfxt1kKVPVWcZmgyDjkRguYKdZ 86gJrOHWuLXGoKUn7ehUmM48zFgBtQRkoXpIpSzQFuvKbnmq/fWL0Le6U1BZFyiVke/3 yssRUnLr1snueyTAb8ZyuxVQ4+BBB4Dny2XWw6h+3L7/U57FH4Rer9OuXOJnWetCtxCB whDA== 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:in-reply-to:references :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=YrKCXfvFHTehNH4HWt4TrPoWHvMJeGeaiAbgtWPthgU=; b=FsNCfV1oT7fp221siyHNvoB4ShpqAd7GcGGU8swL5Okdi+kvsTpImEMGdBFXNR88sw 9r4/i90hytvN7ma5jVHFXTM9H2rnQXWaTtl7BwZpxBrpSRSKXfBDFU37HCJxpB35YRyD Ftr+Kirc3zOp6Oj6pSpromWJyuxISgBKOcCnRQAzreFxB1lAKwi3dnqUHaYJES5RBnFN HwH8yGDkdH5DmVU9HBpl1ZEPs7cXoauENHVGqDIIqDTsPWY8di4mFHlIcZpEzKEmaxR6 OYSBWSCJVBBCv18wZH28ym5hZNGpIya0Os369ur8I1WQlip1lQBSZmCi/H0Zi3tLCc2Y tXmQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAXRHQbga35E2HkMN6SITNLwRPd6zOgFfjyzkkJbjdZB63Gyp6I1 jqyExqPT2z0MPl7Ba0IUuCc= X-Google-Smtp-Source: APXvYqxFPFvVWn2gjV1pxHvfIRiHrHGYkaUA+cvt0dG4ATTdOyMg+Qwr+jnZGglqmInl4qBszl36dQ== X-Received: by 2002:a63:8b41:: with SMTP id j62mr17997836pge.2.1581611374293; Thu, 13 Feb 2020 08:29:34 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aa7:9891:: with SMTP id r17ls9322463pfl.5.gmail; Thu, 13 Feb 2020 08:29:30 -0800 (PST) X-Received: by 2002:a63:1c1b:: with SMTP id c27mr19674387pgc.251.1581611370463; Thu, 13 Feb 2020 08:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581611370; cv=none; d=google.com; s=arc-20160816; b=osvEoTRFoeLM+8QUkvVAm5aWElMY7mbc6QjB0QleioLQmfb7Dk1gfO61PN1HigrVKI TOmfu68Lyotu0OzFJwy5mfsxbi5FHuyJNdW9HfnBZfqUwUC0+zQzw0U/0t/qgTIpJPdU VX+Q7+Y5eM5VZ7EV7vZqTDBDMMfPNbO5Y7E1PjnNvA3COhIjQnDeIYz1tHHlKeQq3bHw 0nRyQswOKSflDimURjydypXCjQVew64Df4/HJlSc2WBe044tPnBV7PCUzBjjB1N7F+eQ UleVmrp8g+ub7R/yWPineeH+HrHxJTmxIt2VtRzOWoxYWQKZkgh8EwQxxMWoaysn+44r euZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=QMXuYBV32zOYxTArvQ5hW1i29UOOs2VIk45RflUUl1o=; b=HS6WrTz2dCA6pdoinV4Q9Y+8kHQ+UAeD3USi3+7kMzQFer7Lx3xca3rjS/KVRUkKlk 16Lpbbz1CkRYH1V1HeqFxb7+DIjcAHsBvBbr8dJuYN69o1sppTrKUA2Y8cZQSP9TB2nH WTz+ez3nl1MX1I9Dgz5Z26ZxH/eqw6TAKu1FTi9mdfBqICm9a1+rO0HVOxQq1LVBitKO qEXD+uZCDfNnVyZkeIIwXpKLkQnz4jqG6UDXI3PcES/k9occUyZMyRUoqEEowWkw/hYA 9nbBCULuQZs6/lEnu/nsG0ddhmHLJ0Lmfgi9khmGD/PL6B9f5mid3BwP6F2rXkjJ2rkz IZ+w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=kdSZaUIB; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::531 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com. [2607:f8b0:4864:20::531]) by gmr-mx.google.com with ESMTPS id k1si100921pgj.0.2020.02.13.08.29.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Feb 2020 08:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::531 as permitted sender) client-ip=2607:f8b0:4864:20::531; Original-Received: by mail-pg1-x531.google.com with SMTP id w21so3359273pgl.9 for ; Thu, 13 Feb 2020 08:29:30 -0800 (PST) X-Received: by 2002:a63:5166:: with SMTP id r38mr12228013pgl.435.1581611370076; Thu, 13 Feb 2020 08:29:30 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id s18sm3875021pgn.34.2020.02.13.08.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 08:29:29 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 5ACA0A231; Thu, 13 Feb 2020 11:29:18 -0500 (EST) In-Reply-To: <9e025799-6d50-40a9-b8ab-a075437cb2b9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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=kdSZaUIB; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::531 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.io gmane.text.pandoc:24450 Archived-At: Yeah, even though it's a sphinx extension, I think I'd be comfortable merging that. Does anyone disagree? The procedure would be to submit a PR. Lucas Escot writes: > Hello everyone, > > I just implemented the highlight directive > > to the pandoc rST reader. > This allows one to specify the default language to use when highlighting > literal blocks. > It is especially useful when writing rST in a literate agda or literate > haskell file, where it is undesirable to have to specify the language at > every code block. > > .. highlight:: haskell > > From now on code will be highlighted as haskell:: > > data Tree = Leaf | Node Tree Tree > > An other exemple too show how terse using literal blocks becomes:: > > main :: IO () > main = putStrLn "Hello World!" > > We can change the language at any point in the document. > > .. highlight:: python > > So this block contains python code:: > > def main(): > print("OK") > > An we can still disable having a default language: > > .. highlight:: > > This directive comes from the Sphinx extended rST (which argueably is one > of the most popular use case of rST out here, see readthedocs.io), > this is why I am wondering *what is your stance on adding directives to the > pandoc reader?* (which are not specified in the docutils reference) > > My opinion is that such an addition is quite reasonable, and most people > use rST with sphinx and are therefore accustomed with said directive > already. > > You can see my implementation here: https://github.com/flupe/pandoc > > If you all agree it can be merged, what is the process? Should I create an > issue mentionning the problem or just make a PR? > > Best, > Lucas > > -- > 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/9e025799-6d50-40a9-b8ab-a075437cb2b9%40googlegroups.com.