public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <krulis.tomas.tk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Corner case: Bullet list item starting with number with period
Date: Thu, 9 Sep 2021 02:15:05 -0700 (PDT)	[thread overview]
Message-ID: <6553671e-f5b0-42d5-998b-38ae3639081en@googlegroups.com> (raw)
In-Reply-To: <m2ilzb2ed7.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>


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

Thank you for the reply!

Created as issue #7557 here: https://github.com/jgm/pandoc/issues/7557

Dne středa 8. září 2021 v 18:58:59 UTC+2 uživatel John MacFarlane napsal:

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

-- 
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/6553671e-f5b0-42d5-998b-38ae3639081en%40googlegroups.com.

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

      parent reply	other threads:[~2021-09-09  9:15 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
     [not found]     ` <m2ilzb2ed7.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-09-09  9:15       ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [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=6553671e-f5b0-42d5-998b-38ae3639081en@googlegroups.com \
    --to=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).