public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Cc: Nathan <nathan.artist-s8PdfxpoPdHk1uMJSBkQmQ@public.gmane.org>
Subject: Re: prevent pandoc from inserting vertical bars in metadata block?
Date: Mon, 19 Apr 2021 07:46:39 +0200	[thread overview]
Message-ID: <CADAJKhB52GyVgab2CzJ_HYCvA+24pS5pvgf4DbvF2YKT-socew@mail.gmail.com> (raw)
In-Reply-To: <m25z0ieuiq.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2928 bytes --]

Den mån 19 apr. 2021 07:03John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:

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

Wouldn't one then have to check that the MetaBlock element contains only a
Para or Plain element and unpack that element into the MetaInlines element?



>
> 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
> .
>
> --
> 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/m25z0ieuiq.fsf%40MacBook-Pro.hsd1.ca.comcast.net
> .
>

-- 
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/CADAJKhB52GyVgab2CzJ_HYCvA%2B24pS5pvgf4DbvF2YKT-socew%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4614 bytes --]

  parent reply	other threads:[~2021-04-19  5:46 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
     [not found]     ` <m25z0ieuiq.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-04-19  5:46       ` BPJ [this message]
     [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=CADAJKhB52GyVgab2CzJ_HYCvA+24pS5pvgf4DbvF2YKT-socew@mail.gmail.com \
    --to=bpj-j3h7gcxpsitlodktgw+v6w@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).