openstreetmap-calendar
openstreetmap-calendar copied to clipboard
Date incorrectly formatted as numbered list
An event description in Latvian that starts with a date - for example, "21. jūlijā" - is incorrectlyformatted as a numbered list. Even more, it is actually converted to "1. jūlijā".
An example entry were this was observed - I hacked around it with a leading backslash, but that's suboptimal, as it's displayed.
https://osmcal.org/event/2220/
Thanks for reporting!
This isn't great, that's true, but that is standard markdown behaviour. Not sure what I can do about it without disabling numbered lists altogether.
I do not speak Latvian, but is this usual that a sentence starts with the date?
Ah, got it. Is there any hack that would prevent it from mangling the number in an invisible way? I changed to "--- ", but maybe there's something more fancy. Also, is it normal for it to mangle "21" into "1"?
Yes, it is perfectly fine for a sentence to start with a date - and it could be any ordinal number, not just a date. For example, a sentence that would say "The 7th-graders stayed at home today because it was -30" could start as "7. klases skolēni...".
Also, is it normal for it to mangle "21" into "1"?
Unfortunately yes. Markdown allows incorrect numbering and still converts it into a running order. You could have three paragraphs starting with "1." and it would convert it into "1." "2." "3.". It's not my favorite Markdown behavior, but it is like it is.
I just tried it out and escaping the dot seems to do the trick, e.g. 21\.jūlijā
Sorry for the inconvenience!
Awesome, thank you - escaping the dot didn't occur to me (added space to follow the grammar rules). Maybe worth adding to FAQ in https://osmcal.org/documentation/ so that there are two entries ;)