micado-eu / MICADO

Main repository for the EU funded MICADO project
https://www.micadoproject.eu/
European Union Public License 1.2
10 stars 1 forks source link

Bold/Italic not working if there is a space after the word #119

Closed trtstm closed 3 years ago

trtstm commented 3 years ago

When writing a text and you mark a word as bold/italic, then add a space (the space will also be in bold/italic), and then undo the bold/italic by clicking on the B/I the saved text will not render properly. It will come out as:

Some more text in **bold **but now I removed bold after the 'space'.

ivchicano commented 3 years ago

This seems to be a bug with the library we use for the conversions between markdown and html:

https://github.com/showdownjs/showdown/issues/741 https://github.com/showdownjs/showdown/issues/726

A workaround is just not using bold or italics with a space before or after, but I know is not very good. I will look into it, but it doesn't look very promising.

ivchicano commented 3 years ago

I have created a workaround in https://github.com/micado-eu/pa_application/commit/e6d49fa615c439f3e791f063f39a053ed418f328 which removes the bold and italics of beginning and trailing spaces With it I would consider this closed, unless this workaround creates another bug.