public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Create new Pandoc RST directives
@ 2017-08-07 15:17 Byteme95
  0 siblings, 0 replies; only message in thread
From: Byteme95 @ 2017-08-07 15:17 UTC (permalink / raw)
  To: pandoc-discuss


[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-07 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-07 15:17 Create new Pandoc RST directives Byteme95

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).