public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: BJ <bjoern.lippert-aoCR0UM+3MJWk0Htik3J/w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Tell pandoc to respect rst in markdown files while transforming to rst
Date: Fri, 14 Aug 2020 11:15:40 -0700	[thread overview]
Message-ID: <m2eeo9jdpv.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <d88ec922-7c61-4cbe-8599-b435540c6a9bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


> How to tell pandoc while transforming the RST-enriched markdown to RST to 
> keep this indention? It seems pandoc removes (left trim) without mercy. Is 
> there a toggle or plugin I missed? Or could I add some magic-markup in the 
> source markdown?

Well, that's very easy, if you're using pandoc's markdown
extensions. Just use a "raw attribute":

```{=rst}
.. note::

   .. include:: /path/to/file

   Some static text also with RST-valid indention 
```

This will be passed verbatim to RST output and ignored for other
formats.


  parent reply	other threads:[~2020-08-14 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 14:58 BJ
     [not found] ` <d88ec922-7c61-4cbe-8599-b435540c6a9bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-14 18:15   ` John MacFarlane [this message]
     [not found]     ` <m2eeo9jdpv.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-18  7:22       ` BJ
     [not found]         ` <ba94e3c9-2f4b-4a5a-bd3b-4f6886aee523n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-21 18:51           ` John MacFarlane

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=m2eeo9jdpv.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=bjoern.lippert-aoCR0UM+3MJWk0Htik3J/w@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).