public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* docx: verbatim blocks inside lists
@ 2020-07-30 17:43 Anton Shepelev
       [not found] ` <20200730204336.90c51e49492120edaa7f4113-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Anton Shepelev @ 2020-07-30 17:43 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hello, all

When I put a verbatim block inside a list item accoridng to
the official Markdown syntax, the `docx' renderer puts a
redantant space before each line of the verbatim text.
When, however, I remove a single space of indentation,
leaving seven spaces instead of the required eight, the text
renders correctly:

------------------------- test.md -----------------------
1. Correct syntax, 8-space indent:

        extraneous space in the output

2. "Hacked" syntax, 7-space indent:

       correct output
--------------------------- EOF -------------------------

Is it a bug or feature?

-- 
Please, do not forward replies to the list to my e-mail.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: docx: verbatim blocks inside lists
       [not found] ` <20200730204336.90c51e49492120edaa7f4113-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-07-30 19:43   ` John MacFarlane
  2020-07-31 10:33     ` Anton Shepelev
  0 siblings, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2020-07-30 19:43 UTC (permalink / raw)
  To: Anton Shepelev, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


See the manual:
https://pandoc.org/MANUAL.html#block-content-in-list-items

Now pandoc conforms to commonmark's indentation rules.
What you need is a 4-space indent past the beginning
of the list item content.  Since your first item begins
after a three character indent, you need 7 spaces for
indented code.

If you want to retain the 8-space indent for the code,
you could use two spaces after the `1.`, or or you can use the
four_space_rule extension to regain the legacy behavior.

Anton Shepelev <anton.txt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hello, all
>
> When I put a verbatim block inside a list item accoridng to
> the official Markdown syntax, the `docx' renderer puts a
> redantant space before each line of the verbatim text.
> When, however, I remove a single space of indentation,
> leaving seven spaces instead of the required eight, the text
> renders correctly:
>
> ------------------------- test.md -----------------------
> 1. Correct syntax, 8-space indent:
>
>         extraneous space in the output
>
> 2. "Hacked" syntax, 7-space indent:
>
>        correct output
> --------------------------- EOF -------------------------
>
> Is it a bug or feature?
>
> -- 
> Please, do not forward replies to the list to my e-mail.
>
> -- 
> 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/20200730204336.90c51e49492120edaa7f4113%40gmail.com.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: docx: verbatim blocks inside lists
  2020-07-30 19:43   ` John MacFarlane
@ 2020-07-31 10:33     ` Anton Shepelev
       [not found]       ` <20200731133310.1641fbf33411351ea9b9a4c6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Anton Shepelev @ 2020-07-31 10:33 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane:

> See the manual:
> https://pandoc.org/MANUAL.html#block-content-in-list-items
>
> Now pandoc conforms to commonmark's indentation rules.
> What you need is a 4-space indent past the beginning of
> the list item content.  Since your first item begins after
> a three character indent, you need 7 spaces for indented
> code.
>
> If you want to retain the 8-space indent for the code, you
> could use two spaces after the `1.`, or or you can use the
> four_space_rule extension to regain the legacy behavior.

Ah, thanks.  I should not have exepected `Pandoc' would
break compatibility with the original Markdown syntax in
addition to extending it...

-- 
Please, do not forward replies to the list to my e-mail.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: docx: verbatim blocks inside lists
       [not found]       ` <20200731133310.1641fbf33411351ea9b9a4c6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-07-31 13:54         ` Daniel Staal
  2020-07-31 17:42           ` Anton Shepelev
  2020-07-31 18:59         ` BPJ
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Staal @ 2020-07-31 13:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 7/31/20 6:33 AM, Anton Shepelev wrote:
>> See the manual:
>> https://pandoc.org/MANUAL.html#block-content-in-list-items
>>
>> Now pandoc conforms to commonmark's indentation rules.
>> What you need is a 4-space indent past the beginning of
>> the list item content.  Since your first item begins after
>> a three character indent, you need 7 spaces for indented
>> code.
>>
>> If you want to retain the 8-space indent for the code, you
>> could use two spaces after the `1.`, or or you can use the
>> four_space_rule extension to regain the legacy behavior.
> Ah, thanks.  I should not have exepected `Pandoc' would
> break compatibility with the original Markdown syntax in
> addition to extending it...

This is actually the first example in the CommonMark docs on why a spec 
is needed:
https://spec.commonmark.org/0.29/#why-is-a-spec-needed-

This behavior actually conforms to the original Markdown 'spec'.  As 
does the behavior you were expecting - because the spec didn't actually 
say either way.

Daniel T. Staal

-- 
---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: docx: verbatim blocks inside lists
  2020-07-31 13:54         ` Daniel Staal
@ 2020-07-31 17:42           ` Anton Shepelev
       [not found]             ` <20200731204250.e744c6b967a526f35e617a1a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Anton Shepelev @ 2020-07-31 17:42 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Daniel Staal:
> Anotn Shepelev:
> > John MacFarlane:
> >
> > > https://pandoc.org/MANUAL.html#block-content-in-list-items
> > > Now pandoc conforms to commonmark's indentation rules.
> > > [...]
> >
> > Ah, thanks.  I should not have exepected `Pandoc' would
> > break compatibility with the original Markdown syntax in
> > addition to extending it...
>
> This is actually the first example in the CommonMark docs
> on why a spec is needed:
>
>   https://spec.commonmark.org/0.29/#why-is-a-spec-needed-
>
> This behavior actually conforms to the original Markdown
> 'spec'.  As does the behavior you were expecting - because
> the spec didn't actually say either way.

It is great that somebody has decided to formalise Markdown
syntax.  But did they contact its designer & architect in
order to make sure they resolve ambiguitities in the true
spirit of Markdown, that is in accordance with the intent of
the creator rather than the letter of the canonical
description?

Anyway, I find the new indentation rules quite usable with
space-padded tabs, but I have not tested it with true tabs
yet.

-- 
Please, do not forward replies to the list to my e-mail.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: docx: verbatim blocks inside lists
       [not found]       ` <20200731133310.1641fbf33411351ea9b9a4c6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2020-07-31 13:54         ` Daniel Staal
@ 2020-07-31 18:59         ` BPJ
  1 sibling, 0 replies; 7+ messages in thread
From: BPJ @ 2020-07-31 18:59 UTC (permalink / raw)
  To: pandoc-discuss

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

 My advice is to always use the four_space_extension since it will preserve
your sanity. I can honestly not understand what the advantage of abandoning
it might be.

-- 
Better --help|less than helpless

Den fre 31 juli 2020 12:34Anton Shepelev <anton.txt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> John MacFarlane:
>
> > See the manual:
> > https://pandoc.org/MANUAL.html#block-content-in-list-items
> >
> > Now pandoc conforms to commonmark's indentation rules.
> > What you need is a 4-space indent past the beginning of
> > the list item content.  Since your first item begins after
> > a three character indent, you need 7 spaces for indented
> > code.
> >
> > If you want to retain the 8-space indent for the code, you
> > could use two spaces after the `1.`, or or you can use the
> > four_space_rule extension to regain the legacy behavior.
>
> Ah, thanks.  I should not have exepected `Pandoc' would
> break compatibility with the original Markdown syntax in
> addition to extending it...
>
> --
> Please, do not forward replies to the list to my e-mail.
>
> --
> 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/20200731133310.1641fbf33411351ea9b9a4c6%40gmail.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/CADAJKhCVQomcNKg6OQZVtxC1mcFfoeOG--tjHjib4DxiGaKvPQ%40mail.gmail.com.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: docx: verbatim blocks inside lists
       [not found]             ` <20200731204250.e744c6b967a526f35e617a1a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-07-31 19:00               ` Albert Krewinkel
  0 siblings, 0 replies; 7+ messages in thread
From: Albert Krewinkel @ 2020-07-31 19:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Anton Shepelev writes:

> It is great that somebody has decided to formalise Markdown
> syntax.  But did they contact its designer & architect in
> order to make sure they resolve ambiguitities in the true
> spirit of Markdown, that is in accordance with the intent of
> the creator rather than the letter of the canonical
> description?

The world lost one of the co-inventors of Markdown in 2013.
If you are interested in the early history of CommonMark, here's
one account of it.
https://blog.codinghorror.com/standard-markdown-is-now-common-markdown/

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-31 19:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 17:43 docx: verbatim blocks inside lists Anton Shepelev
     [not found] ` <20200730204336.90c51e49492120edaa7f4113-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-07-30 19:43   ` John MacFarlane
2020-07-31 10:33     ` Anton Shepelev
     [not found]       ` <20200731133310.1641fbf33411351ea9b9a4c6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-07-31 13:54         ` Daniel Staal
2020-07-31 17:42           ` Anton Shepelev
     [not found]             ` <20200731204250.e744c6b967a526f35e617a1a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-07-31 19:00               ` Albert Krewinkel
2020-07-31 18:59         ` BPJ

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