public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Nathan <nathan.artist-s8PdfxpoPdHk1uMJSBkQmQ@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: prevent pandoc from inserting vertical bars in metadata block?
Date: Sun, 18 Apr 2021 22:02:53 -0700	[thread overview]
Message-ID: <m25z0ieuiq.fsf@MacBook-Pro.hsd1.ca.comcast.net> (raw)
In-Reply-To: <9728d1f4-040e-4392-aa04-148f648a8dfdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


I just pushed a fix for this.

In the mean time you could work around this by using
a Lua filter that converts MetaBlocks elements to MetaInlines.


Nathan <nathan.artist-s8PdfxpoPdHk1uMJSBkQmQ@public.gmane.org> writes:

> I'm using another application that outputs MultiMarkdown with a metadata 
> block in the following format:
>
> Title: Blah blah blah
> Author: Doo de Doo
> Base Header Level: 1
> Bibliography: Pubs.bib
> Lang: en-GB
>
> Converting this using pandoc -f markdown_mmd -t markdown --standalone we 
> get a metadata block in the following format:
>
> ---
> author: |
>   Doo de Doo
> baseheaderlevel: |
>   1
> bibliography: |
>   Pubs.bib
> lang: |
>   en-GB
> title: |
>   Blah blah blah
> ---
>
> Is there any way within pandoc to get rid of the vertical bar and newline 
> in the metadata fields so that each metadata field is on a single line like 
> in the input file? I know I can pipe the file to something like perl (which 
> has been my workaround) but was wondering if there is a way to do it only 
> with pandoc? (The vertical bar, or whatever it corresponds to in pandoc's 
> AST, causes trouble in epub output by inserting an unwanted p element 
> within title and author elements in the title page.)
>
> -- 
> 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/9728d1f4-040e-4392-aa04-148f648a8dfdn%40googlegroups.com.


  parent reply	other threads:[~2021-04-19  5:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 18:52 Nathan
     [not found] ` <9728d1f4-040e-4392-aa04-148f648a8dfdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-04-19  5:02   ` John MacFarlane [this message]
     [not found]     ` <m25z0ieuiq.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-04-19  5:46       ` BPJ
     [not found]         ` <CADAJKhB52GyVgab2CzJ_HYCvA+24pS5pvgf4DbvF2YKT-socew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-04-19 20:01           ` 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=m25z0ieuiq.fsf@MacBook-Pro.hsd1.ca.comcast.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=nathan.artist-s8PdfxpoPdHk1uMJSBkQmQ@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).