From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29203 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Corner case: Bullet list item starting with number with period Date: Wed, 8 Sep 2021 03:07:47 -0700 (PDT) Message-ID: <35cb746c-1ee8-4fd4-b7fb-753caa8c5e1dn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_9118_1325558375.1631095667870" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15560"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCJOHJEKUQNBB5EW4KEQMGQEWJAIOLQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 08 12:07:52 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f190.google.com ([209.85.167.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mNuUh-0003mN-4l for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 08 Sep 2021 12:07:51 +0200 Original-Received: by mail-oi1-f190.google.com with SMTP id m3-20020aca1e03000000b00268ff33ea91sf1005510oic.5 for ; Wed, 08 Sep 2021 03:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=T3m2b6Fu+d0SWsTp6M7O2Jf4Z+QsUzWUu8zli/4JweQ=; b=ppbrYXEWn6wAz/H83VhfT6SfboRxtXKC6R5BUC5s1w65wWcDP8wZLj1pMz1p7K/Wm2 wNT2V2gSrhKbcqvnJMBNHeMzd7tX0l8O5Dxvq/ZCdgH1ub3JBNFLiR7Renrn2TCm8SHW +FMtzEM52HCla9nQd4utq1/AfITQ0k8J2SIkehBZarA/Pnne0xIF4EJdJ85i5TrkBG43 PoKFkj/zmsNo1yBzEKfCsQr6JgW3qM8JwFEs80KmktwBjHOt6ZDjIWUrfSGgiIGlbeXP oQype62OQYBAlENIWsaXD/9fjhCSWWMmt+5pjosPNDxA0XGj6W63ubz/wjtc0BDxEcQR iHQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=T3m2b6Fu+d0SWsTp6M7O2Jf4Z+QsUzWUu8zli/4JweQ=; b=VRcS9lc0CSq9Yk7MjANn65YZQ6/cOHcq27f+aoD08mlyy5PQcoeQIMNds5vfu7UtXA fZiIDsgrHRN99gN973N3Mg01Pwc/npWS7N8YwacTxuql5x8clqg9HudcQusOoF9B2cF6 HHKmQpxMuGu73y+e59bKOmScuHp6RM3CZFXcs2KvxYwx16DWxRbpgzR1tKqywcRh18CU ql7MadlvxO6nBXSul4iVAypitjrw3yVops41uND63J+fEfZyvobPOGOZuGg/h6MP8yyP +O+LmnO3ltRjP9QzW+yMsAdbYtt200zqdICXCB541yxEjxpLpZMprF2wwewqJ4NWh9JT PWDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=T3m2b6Fu+d0SWsTp6M7O2Jf4Z+QsUzWUu8zli/4JweQ=; b=uioRZB2TIUPZJUoeWHRH2mzGVlIYsQMAvDG+2949CzxeZ+aI8MabVDHVfs7g82UNDR Q5ycSiQwIOQBO3uEv492jtRN2YYZJW/NmpOO7abXRTeUWp3K5wIbGKzN5IjTKLtYhxWp AomAxUVkAfSi2foxT+4yJ4uMsUBBS+ySrtC/MYm+o/PRu9SaVhLV6gv4HREt85NmgCtt P/y+c/NR4EGATZjQt4zOPZC7mzR7r3ZC3+s00Z+xoU73Kl+Giqfx5NFGGnXnVDMQJAaz dC0hlkhP0Im5S2BD+BtshqEfv86NVYTvIfKqNz11U/Kj0DW/CdsbBFOE9fa4LmeJ1V5I 8n6g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532+yCxLVxSOWFfXhVAYHRjVA+Zx1023gMZEGYORl+NVT7644yEr wj+JXmRankKML8+aYG1zTCM= X-Google-Smtp-Source: ABdhPJzXITaBdSF9FxVd31P6NmzoAI+NFz83aZnzjGSg/Fa55VkAwwXHZOXUt0xiv3Pd5xGsfr3JZw== X-Received: by 2002:a05:6820:121:: with SMTP id i1mr2121949ood.57.1631095669833; Wed, 08 Sep 2021 03:07:49 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:5904:: with SMTP id t4ls430014oth.1.gmail; Wed, 08 Sep 2021 03:07:48 -0700 (PDT) X-Received: by 2002:a05:6830:124b:: with SMTP id s11mr2277047otp.90.1631095668468; Wed, 08 Sep 2021 03:07:48 -0700 (PDT) X-Original-Sender: krulis.tomas.tk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29203 Archived-At: ------=_Part_9118_1325558375.1631095667870 Content-Type: multipart/alternative; boundary="----=_Part_9119_143727546.1631095667870" ------=_Part_9119_143727546.1631095667870 Content-Type: text/plain; charset="UTF-8" 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. ------=_Part_9119_143727546.1631095667870 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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
```
<= br>
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
```

<= /div>
removes even more:

```{native}
[BulletList [[OrderedList (1,DefaultStyle,DefaultDelim) [[OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "meeting"]]]]]]]]
```

Meaning removes all numbers, whitespace, periods until alphabetic let= ters.

Markdown conversio= n acts a little differently -- anything that seems as a start of ordered li= st 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 di= fferent number than 1. But that breaks when using dates in start of a bulle= t 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 c= onsidered regular text, until a linebreak; or 2 linebreaks with text starti= ng 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 i= s 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 ren= der 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 &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_9119_143727546.1631095667870-- ------=_Part_9118_1325558375.1631095667870--