260
submitted 2 days ago by davel@lemmy.ml to c/memes@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] teagrrl@lemmy.ml 5 points 2 days ago

Well that's neat. There's no reliable way to make it a certain color then? Is it based on the theme I am using and how the CSS style is for inline code?

[-] davel@lemmy.ml 6 points 2 days ago

AFAIK there’s no way to specify color. How the markdown-it code interpreter selects colors is a mystery to me.

[-] teagrrl@lemmy.ml 5 points 2 days ago

I love a good mystery.

[-] dessalines@lemmy.ml 3 points 2 days ago

lemmy-ui has code themes that try to smartly guess which language anything in backticks is in, so it can do syntax highlighting for that language.

IE

rust

fn main() {
  let x = XFunction::read();
}

typescript

function main() {
  const x = xFunctionRead();
}
this post was submitted on 18 Nov 2026
260 points (99.6% liked)

Memes

57668 readers
829 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 7 years ago
MODERATORS