Markdown viewer problem with code integration

version Joplin 1.0.201 (prod, darwin) Mac OS

I get some strange color when using code in a note
Here’s the text :

Photos & Vidéos

exiftool "-alldates<datetimeoriginal" *.jpg -overwrite_original
exiftool "-filemodifydate<datetimeoriginal" *.jpg

in the first line “exiftool” is green and becomes black if I change replace “.jpg” par “.JPG” ; in the second it’s black
in other lines the code is red.
I don’t really get the point.
Is there a problem with code integration ?
thank you

hum this forum seem's to use the same markdown viewer :slight_smile:

If you do not define what type the code is in a fenced block, i.e. where you start the markdown with: ``` on its own on a line, the interpreter will try to guess what needs highlighting.

So if you use:


Your code block will look like this

exiftool "-alldates<datetimeoriginal" *.jpg -overwrite_original
exiftool "-filemodifydate<datetimeoriginal" *.jpg

but if you use


it will look like this

exiftool "-alldates<datetimeoriginal" *.jpg -overwrite_original
exiftool "-filemodifydate<datetimeoriginal" *.jpg

although in Joplin the type for text is actually


If your block of code is css you use


if it's html


and so on...

This post and the one after it covers this in a bit more detail.

Thanks a lot for your answer, now I understand

my experience is that this forum doesn’t use the same markdown viewer, Joplin desktop’s one does a better job, but still not perfect for some code (and sadly the font is too feint for my eyes)


If the rendered code is a bit faint for you, you could try adding this to your userstyle.css file so as to “enbolden it” a little bit!!

code {
     font-weight: 500;
     /* sets code font weight - fenced code and pre */

Thanks for that. Works a treat. However I needed a bit more, so played with increasing the number. It’s a pain to keep restarting Joplin to see result, would be nice if there was a redraw button within Joplin.

Works nice thank you