Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Bugs in Markdown

Open echo0x22 opened this issue 2 years ago • 4 comments

  1. In the list, the numbers are forced to be reformatted in natural order: image image
  2. Not sure (Bug/Feature?): image image
  3. Big numbers in lists are corrupted: image image
  4. Not sure. For small numbers (0-9) offset is okay, for bigger (10-99) it's quite off (what if reply will contain both small numbers and big): image

echo0x22 avatar Feb 24 '23 18:02 echo0x22

related #1833

notmd avatar Feb 24 '23 18:02 notmd

For 1 and 4 it's the same on GitHub and ChatGPT

Slowlife01 avatar Feb 25 '23 01:02 Slowlife01

For 1,2 and 4 maybe that how markdown work. For 3 I don't think we need to support three digits. Is there anyone who writes up to 100 items?

notmd avatar Feb 25 '23 01:02 notmd

1 is MarkDown standard, 2 isn't completely right - normally line breaks are done with an empty line, so the second paragraph should be rendered like

And here's too. 3. Summary

However, some editors like GitHub's don't require an empty line, so I guess that's what the author was emulating. The reason why the last line doesn't turn into a list item is because it needs an empty line above it, though some MD editors don't get that right either.

Number 4 looks right to me - you want the indexes right-aligned. Number 3 is the only actual bug, in VS Code and GitHub the index remains right-aligned up to 9 digits, after which it will become left-aligned. That being said, GitHub also seems to break after 5 digits.

  1. 4 digits

  1. 6 digits

  1. 9 digits

1000000000. 10 digits

It looks like most MD editors indent the list items enough for at least 3 digits, so maybe we can change that.

horribleCodes avatar Mar 01 '23 09:03 horribleCodes

This fix caused issue: https://github.com/LAION-AI/Open-Assistant/issues/1968

I propose a possible fix there.

johnflux avatar Mar 06 '23 07:03 johnflux