public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Unsupported extension in Commonmark_x resulting in alternative output
Date: Thu, 23 Jun 2022 16:13:10 +0200	[thread overview]
Message-ID: <87zgi31n35.fsf@zeitkraut.de> (raw)
In-Reply-To: <m2pmizrjc5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>

Obligatory "a Lua filter can help" post:

    function LineBreak ()
      return pandoc.RawInline('markdown', '\\\n')
    end

Save the above to a file and pass it to pandoc via the --lua-filter
command line parameter.

John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

> This is a bit tricky.  escaped_line_breaks isn't really an
> extension for commonmark, because it is part of the core spec.
> The writer uses two spaces instead; both are supported according
> to the spec, and the writer has to make a choice.
>
> Thomas Byskov Dalgaard <tbdlist-AHfMSizzl90sTMJHDOTzqX9LOBIZ5rWg@public.gmane.org> writes:
>
>> Hi!
>>
>> Think I have found something that is unexpected behaviour when using the commonmark_x format with extensions.
>>
>> Here is the case.
>>
>> I want to convert from Markdown to Commonmark_x. I have read the Commonmark
>> spec, and from here hard line breaks can be inserted either by two spaces or a
>> backslash at the end of a line inside a paragraph.
>>
>> This is fine when I write my Markdown document, but when I convert all
>> backslashes are removed and replaced with two spaces.
>>
>> I have tried to enable the extension escaped_line_breaks but Pandoc says that this extension is not supported.
>>
>> Why is it that Pandoc allows backslashes to be used but not allowed when converting?
>>
>> Best regards Thomas 


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


      parent reply	other threads:[~2022-06-23 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 19:23 Thomas Byskov Dalgaard
     [not found] ` <7F040099-8F18-41C2-BB05-0A4658311704-AHfMSizzl90sTMJHDOTzqX9LOBIZ5rWg@public.gmane.org>
2022-06-23  6:21   ` John MacFarlane
     [not found]     ` <m2pmizrjc5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-06-23 13:19       ` Line breaks (Was: Re: Unsupported extension in Commonmark_x resulting in alternative output) Daniel Staal
     [not found]         ` <377aa06e-714c-ba4a-5445-dc9d518b95ab-Jdbf3xiKgS8@public.gmane.org>
2022-06-23 19:11           ` BPJ
2022-06-23 20:17           ` John MacFarlane
     [not found]             ` <m25ykrqgmk.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-06-23 20:51               ` Thomas Byskov Dalgaard
2022-06-24 14:06               ` Daniel Staal
2022-06-23 14:13       ` Albert Krewinkel [this message]

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=87zgi31n35.fsf@zeitkraut.de \
    --to=albert+pandoc-9eawchwdxg8hfhg+jk9f0w@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).