public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: "krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<krulis.tomas.tk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Corner case: Bullet list item starting with number with period
Date: Wed, 08 Sep 2021 09:58:44 -0700	[thread overview]
Message-ID: <m2ilzb2ed7.fsf@MacBook-Pro-2.hsd1.ca.comcast.net> (raw)
In-Reply-To: <35cb746c-1ee8-4fd4-b7fb-753caa8c5e1dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


If pandoc renders this differently than Emacs interprets it in
org-mode, then it can be considered a bug and should be reported
on the tracker.

"krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <krulis.tomas.tk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Recently I have hit upon a corner case which (I guess) wasnt probably 
> thought off. If you have bullet list item like so:
>
> ```{org}
> - 11. and 12. 09. meeting
> ```
>
> converting to pandoc AST yields (ran in Try pandoc):
>
> ```{native}
> [BulletList [[OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str 
> "and",Space,Str "12.",Space,Str "09.",Space,Str "meeting"]]]]]] 
> ```
>
> removing first number.
>
> Running this:
>
> ```{org}
> - 11. 09. meeting
> ```
>
> removes even more:
>
> ```{native}
> [BulletList [[OrderedList (1,DefaultStyle,DefaultDelim) [[OrderedList 
> (1,DefaultStyle,DefaultDelim) [[Plain [Str "meeting"]]]]]]]] 
> ```
>
> Meaning removes all numbers, whitespace, periods until alphabetic letters.
>
> Markdown conversion acts a little differently -- anything that seems as a 
> start of ordered list is interpreted as such:
>
> ```{md}
> - 11. 09. meeting
> ```
>
> produces:
>
> ```{native}
> [BulletList [[OrderedList (11,Decimal,Period) [[OrderedList 
> (9,Decimal,Period) [[Plain [Str "meeting"]]]]]]]] 
> ```
>
> and 
>
> ```{md}
> - 11. and 12. 09. meeting
> ```
>
> produces:
>
> ```{native} 
> [BulletList [[OrderedList (11,Decimal,Period) [[Plain [Str "and",Space,Str 
> "12.",Space,Str "09.",Space,Str "meeting"]]]]]]
> ```
>
> I guess that pandoc is making a pretty sensible assumption that all those 
> numbers ending with period are starting new ordered list from different 
> number than 1. But that breaks when using dates in start of a bullet list 
> item.
>
> As far as I know pandoc doesnt have a "date" element, and I also think it 
> doesnt need one.
>
> As proposed solution I think that another check in readers should be made 
> that all text after bullet mark should be considered regular text, until a 
> linebreak; or 2 linebreaks with text starting in column 2 (for items 
> spanning more than one paragraph).
>
> I have hit upon this when converting Org mode to docx, in where the first 
> number is actually left off totally, so:
>
> ```{org}
> - 11. and 12. 09. meeting
> ```
>
> results in:
>
> ```{docx}
> - and 12. 09. meeting
> ```
>
> Which in my opinion is bug in all instances. If it would render ordered 
> list in bullet list (as it should with):
>
> ```{native} 
> [BulletList [[OrderedList (11,Decimal,Period) [[Plain [Str "and",Space,Str 
> "12.",Space,Str "09.",Space,Str "meeting"]]]]]]
> ```
>
> it would be easier to notice, at least.
>
> Can this corner case be resolved better? Should I make this a github issue?
>
> -- 
> 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/35cb746c-1ee8-4fd4-b7fb-753caa8c5e1dn%40googlegroups.com.


  parent reply	other threads:[~2021-09-08 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 10:07 krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found] ` <35cb746c-1ee8-4fd4-b7fb-753caa8c5e1dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-08 16:58   ` John MacFarlane [this message]
     [not found]     ` <m2ilzb2ed7.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-09-09  9:15       ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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=m2ilzb2ed7.fsf@MacBook-Pro-2.hsd1.ca.comcast.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=krulis.tomas.tk-Re5JQEeQqe8AvxtiuMwx3w@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).