From: Byteme95 <serbanghita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Create new Pandoc RST directives
Date: Mon, 7 Aug 2017 08:17:40 -0700 (PDT) [thread overview]
Message-ID: <6222bb7b-5caf-4afa-8a64-d6a07f054aa8@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1429 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 7032 bytes --]
reply other threads:[~2017-08-07 15:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6222bb7b-5caf-4afa-8a64-d6a07f054aa8@googlegroups.com \
--to=serbanghita-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).