Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date incorrectly formatted as numbered list #140

Open
richlv opened this issue Jul 14, 2023 · 4 comments
Open

Date incorrectly formatted as numbered list #140

richlv opened this issue Jul 14, 2023 · 4 comments

Comments

@richlv
Copy link

richlv commented Jul 14, 2023

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/

@thomersch
Copy link
Owner

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?

@richlv
Copy link
Author

richlv commented Jul 14, 2023

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...".

@thomersch
Copy link
Owner

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!

@richlv
Copy link
Author

richlv commented Jul 14, 2023

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants