public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Horizontal rule immediately after text
@ 2016-04-26 17:37 John Muccigrosso
       [not found] ` <7d2caf01-890c-4686-8ec3-4737092f0457-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John Muccigrosso @ 2016-04-26 17:37 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1520 bytes --]

While messing around with some of the options over on the "Syntax for divs" 
issue in GitHub <https://github.com/jgm/pandoc/issues/168>, I ran into some 
unexpected behavior with inserting horizontal rules immediately after text. 
All of the following create horizontal rules when preceded by a blank line:

___
***
---

They'll also work with spaces inserted between the characters. Of course if 
the three hyphens immediately follow text, they create a setext-style 
header. However the other two sequences shouldn't. Nor should any of the 
forms with inserted spaces. And both the other sequences and the three 
sequences with inserted spaces should also create a horizontal rule. Yet 
none of them do, unless they are preceded by a blank line. That is, none of 
the following generate horizontal rules under pandoc unless the "from" 
format is commonmark:
Hi
***

Hi
___

Hi
- - -

Hi
* * *

Hi
_ _ _


Isn't this standard markdown formatting?

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7d2caf01-890c-4686-8ec3-4737092f0457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 4254 bytes --]

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

* Re: Horizontal rule immediately after text
       [not found] ` <7d2caf01-890c-4686-8ec3-4737092f0457-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-04-26 18:31   ` John MACFARLANE
       [not found]     ` <20160426183115.GA34351-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MACFARLANE @ 2016-04-26 18:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Some implementations require the blank line, others don't:
http://johnmacfarlane.net/babelmark2/?normalize=1&text=hi%0A***%0Athere%0A

+++ John Muccigrosso [Apr 26 16 10:37 ]:
>   While messing around with some of the options over on the "Syntax for
>   divs" issue [1]in GitHub, I ran into some unexpected behavior with
>   inserting horizontal rules immediately after text. All of the following
>   create horizontal rules when preceded by a blank line:
>   ___
>   ***
>   ---
>   They'll also work with spaces inserted between the characters. Of
>   course if the three hyphens immediately follow text, they create a
>   setext-style header. However the other two sequences shouldn't. Nor
>   should any of the forms with inserted spaces. And both the other
>   sequences and the three sequences with inserted spaces should also
>   create a horizontal rule. Yet none of them do, unless they are preceded
>   by a blank line. That is, none of the following generate horizontal
>   rules under pandoc unless the "from" format is commonmark:
>   Hi
>   ***
>   Hi
>   ___
>   Hi
>   - - -
>   Hi
>   * * *
>   Hi
>   _ _ _
>   Isn't this standard markdown formatting?
>
>   --
>   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 [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [3]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [4]https://groups.google.com/d/msgid/pandoc-discuss/7d2caf01-890c-4686-
>   8ec3-4737092f0457%40googlegroups.com.
>   For more options, visit [5]https://groups.google.com/d/optout.
>
>References
>
>   1. https://github.com/jgm/pandoc/issues/168
>   2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   4. https://groups.google.com/d/msgid/pandoc-discuss/7d2caf01-890c-4686-8ec3-4737092f0457-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   5. https://groups.google.com/d/optout


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

* Re: Horizontal rule immediately after text
       [not found]     ` <20160426183115.GA34351-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2016-04-26 19:24       ` John Muccigrosso
       [not found]         ` <77827528-e1da-4ca8-9878-67513c7ba0d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John Muccigrosso @ 2016-04-26 19:24 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1041 bytes --]

On Tuesday, April 26, 2016 at 2:31:30 PM UTC-4, John MacFarlane wrote:
>
> Some implementations require the blank line, others don't: 
> http://johnmacfarlane.net/babelmark2/?normalize=1&text=hi%0A***%0Athere%0A 
>

Right, but ones that turn them into a rule are in the majority and include 
markdown.pl itself. Is there a reason not to adhere to that?

(I'm not super concerned about this, but it seems odd to me that the blank 
line is needed.)

PS Nice resource!

 

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/77827528-e1da-4ca8-9878-67513c7ba0d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2313 bytes --]

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

* Re: Horizontal rule immediately after text
       [not found]         ` <77827528-e1da-4ca8-9878-67513c7ba0d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-04-26 22:17           ` Daniel Staal
       [not found]             ` <5563EB9704768F3DF0386FE4-3uUC32ntyBiNj9Bq2fkWzw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Staal @ 2016-04-26 22:17 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

--As of April 26, 2016 12:24:43 PM -0700, John Muccigrosso is alleged to 
have said:

> Right, but ones that turn them into a rule are in the majority and
> include  markdown.pl itself. Is there a reason not to adhere to that?
>
> (I'm not super concerned about this, but it seems odd to me that the
> blank  line is needed.)

--As for the rest, it is mine.

At the moment, probably the only reason would be compatibility with other 
versions of Pandoc - it's the type of thing where a 'random' change could 
break people's documents in odd ways.

That said - Pandoc can also read Markdown as CommonMark, and the CommonMark 
spec doesn't require the blank line there.  So if you don't mind losing 
some of Pandoc's extensions to the spec, you can get the more common 
behavior.  (And it might be worth the thought - if CommonMark is supposed 
to be an evolution of the Markdown spec - of: Does Pandoc want to adhere to 
CommonMark in this case?)

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] 5+ messages in thread

* Re: Horizontal rule immediately after text
       [not found]             ` <5563EB9704768F3DF0386FE4-3uUC32ntyBiNj9Bq2fkWzw@public.gmane.org>
@ 2016-04-27  3:11               ` John Muccigrosso
  0 siblings, 0 replies; 5+ messages in thread
From: John Muccigrosso @ 2016-04-27  3:11 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1849 bytes --]

On Tuesday, April 26, 2016 at 6:17:20 PM UTC-4, Daniel Staal wrote:
>
> At the moment, probably the only reason would be compatibility with other 
> versions of Pandoc - it's the type of thing where a 'random' change could 
> break people's documents in odd ways. 
>
> That said - Pandoc can also read Markdown as CommonMark, and the 
> CommonMark 
> spec doesn't require the blank line there.  So if you don't mind losing 
> some of Pandoc's extensions to the spec, you can get the more common 
> behavior.  (And it might be worth the thought - if CommonMark is supposed 
> to be an evolution of the Markdown spec - of: Does Pandoc want to adhere 
> to 
> CommonMark in this case?) 



1. Yes, I do mind losing the pandoc goodness.
2. I tend to agree about following CommonMark, but in this case that also 
means following the original markdown, which remains a source of confusion 
to me.

But, if pandoc were to become compatible with this approach, is the 
backwards compatibility a big deal? How often is someone writing a line of 
text with a following series of three asterisks or underscores, for 
example? That is, these hr-makers would seem to be extremely unlikely to 
occur in other contexts, so such a change would be unlikely to have a big 
impact on anyone, no?

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/afc96e82-2771-45f4-af80-ca5900ab6ade%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2504 bytes --]

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

end of thread, other threads:[~2016-04-27  3:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 17:37 Horizontal rule immediately after text John Muccigrosso
     [not found] ` <7d2caf01-890c-4686-8ec3-4737092f0457-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-26 18:31   ` John MACFARLANE
     [not found]     ` <20160426183115.GA34351-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2016-04-26 19:24       ` John Muccigrosso
     [not found]         ` <77827528-e1da-4ca8-9878-67513c7ba0d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-26 22:17           ` Daniel Staal
     [not found]             ` <5563EB9704768F3DF0386FE4-3uUC32ntyBiNj9Bq2fkWzw@public.gmane.org>
2016-04-27  3:11               ` John Muccigrosso

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