From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18025 Path: news.gmane.org!.POSTED!not-for-mail From: Byteme95 Newsgroups: gmane.text.pandoc Subject: Create new Pandoc RST directives Date: Mon, 7 Aug 2017 08:17:40 -0700 (PDT) Message-ID: <6222bb7b-5caf-4afa-8a64-d6a07f054aa8@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3439_1060419302.1502119060567" X-Trace: blaine.gmane.org 1502119085 12248 195.159.176.226 (7 Aug 2017 15:18:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Aug 2017 15:18:05 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDX6RXPO5QFRBFMJULGAKGQEWHZTYKQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 07 17:17:51 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pg0-f64.google.com ([74.125.83.64]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dejmh-0001ql-VX for gtp-pandoc-discuss@m.gmane.org; Mon, 07 Aug 2017 17:17:36 +0200 Original-Received: by mail-pg0-f64.google.com with SMTP id u132sf396303pgb.2 for ; Mon, 07 Aug 2017 08:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=6De6iSaxks1bTEFlsNovjMkxu86eZPdxZ1L8+uPyBig=; b=LbyDBEvJ1zvdi68UnpRw/fobnEL+zngBQCNYvvFp96tbWhBcH6cAFqY7lFQcpR5yzy BUfcYs+EpkFGnynLwJZLKpU9sUEhf5RBEJN/mTolOTVYfCIHlc4lodEYHsNLr6KX6Dci XK4ZpHTSPzhXV3IiM+68/ysbfPQHg6mGZ4zUD+hPlEog0miZdUsJCVYzQm6D0D56wwc3 K+UwClvBG0L5BgQs+IyNUDBn+4C+bHOvxKQztpxJ7JCwf2lKj4pDD6e1e3w32UaxQRyC RWC9bFMB0+1vUFmhuq/ERrkTNnp8UmPqGXxH2/gnCnCwC0Pel3qv2FEwgnwzspY8Wlup 4TQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=6De6iSaxks1bTEFlsNovjMkxu86eZPdxZ1L8+uPyBig=; b=aj61JlCO0bGbgms14PTIkS5Ztqsf0mwrLuTmhsv7e7g26rPjyQDRlFROFfmwJi116b jBxE9MtjJsglCYGXowu3LFv1Wf+jbgLZgZQRVdfNVwT4Pod326ruWhKyykCh3610w29r DCuPQUdxAGP87HM5NHq5B5ou7x3JfMnEV6K4nWMmJsgst9S2I/piX/+ZeU1tyW6lcRHQ X4o6ngYX8IJf2PLfZ8ETqgTTm5qVHf3mhm0vYo51YnWMPBcYAulh03DrUaTBZnld4wKM 0BFhXdpjrZEy+xSPdKFJw/UprSOPLMJU4OQ0JEgMkJjJCMgf2kutgTnn5Wx6bKXUWASA oGGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=6De6iSaxks1bTEFlsNovjMkxu86eZPdxZ1L8+uPyBig=; b=bc8gY6EkSyFxY+JmYLMu381JNsKT6H4YV4jBaPa7DyJbUjUb6F709bEF1kcJNXwF9U XvYpHjTyt8yS2icg5oY4PINgcN2LUu3Nqm28q04FZDbhiPdZhJVnpD4b3euBwCvj7zMY 8taA2FHEJciJm49dmej3l44H18wkC5lzVj/RAq+VFHtkOIRuhX6BxE0KeT2dCFRxXZdZ s3sAGwBXfPBbVlc2ycuHgt6L4HeHHfTbO+kP7E9ocAGQM82F8SrpdsnrF5BDs9Sr9RIg VVAR+MSSan205O9bqeHswpO3ABMM/trgd0KpXOExIBQfWJMTn+2zZTpSaDn7QMeTCYZo UJ1Q== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AIVw1134JZ4lgUywLa2i6QVTOCCHh0b7kB6Htuljr99IJviQyI5Jhu32 ACksQuOH3vdQ3w== X-Received: by 10.36.50.88 with SMTP id j85mr51620ita.12.1502119061886; Mon, 07 Aug 2017 08:17:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.169.79 with SMTP id s76ls1041441ioe.3.gmail; Mon, 07 Aug 2017 08:17:41 -0700 (PDT) X-Received: by 10.36.71.72 with SMTP id t69mr50578itb.12.1502119061115; Mon, 07 Aug 2017 08:17:41 -0700 (PDT) X-Original-Sender: serbanghita-Re5JQEeQqe8AvxtiuMwx3w@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:18025 Archived-At: ------=_Part_3439_1060419302.1502119060567 Content-Type: multipart/alternative; boundary="----=_Part_3440_198138212.1502119060568" ------=_Part_3440_198138212.1502119060568 Content-Type: text/plain; charset="UTF-8" I have a file test.rst that has custom RST directives. This is generated from a sphinx-build documentation. The main title ============== Some paragraph content. .. myproject:component:: /path/to/my/component Description of my component. Testing with pandoc --verbose -t native test.rst The output is: [Header 1 ("the-main-title",[],[]) [Str "The",Space,Str "main",Space,Str "title"] ,Para [Str "Some",Space,Str "paragraph",Space,Str "content."]] As you can see the custom directive is not present in the AST. I was looking at the RST Reader: https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Readers/RST.hs#L1520 What is a good way of adding a new directive to Pandoc so that *when I convert the RST file to Markdown* it can get interpreted. First I need the Reader to understand those custom directives. Please advise. Thank you! -- 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/6222bb7b-5caf-4afa-8a64-d6a07f054aa8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_3440_198138212.1502119060568 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have a file test.rst that has custom RST directives.
= This is generated from a sphinx-build documentation.

The main title
=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D


Some paragraph content.


..= myproject= :component= ::<= span style=3D"color: #000;" class=3D"styled-by-prettify"> /path/to/my/component


=C2=A0
Description of my component.

=
Testing with=C2=A0pandoc --verbose -t native test.rst

The output is:
[Header 1 ("the-main-title",[],[]) [Str "The",Space,Str = "main= ",Space<= span style=3D"color: #660;" class=3D"styled-by-prettify">,Str "title"]
,Para = [Str "Some",Space,Str "paragraph",Space,Str <= /span>"conte= nt."]= ]

As you can see th= e custom directive is not present in the AST.

I wa= s looking at the RST Reader:=C2=A0https://github.com/jgm/pandoc/blob/master= /src/Text/Pandoc/Readers/RST.hs#L1520
What is a good way of addin= g a new directive to Pandoc so that when I convert the RST file to Markd= own it can get interpreted.
First I need the Reader to un= derstand those custom directives.

Please advise.

Thank you!

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/6222bb7b-5caf-4afa-8a64-d6a07f054aa8%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_3440_198138212.1502119060568-- ------=_Part_3439_1060419302.1502119060567--