Markdown less than or equal to not rendered

Hi, I’m trying to use doc. Markdown to show something like date(≤20240101), so my markdown is

date(\leq 20240101)

But it’s not rendered, it just shows the string of leq, what should I do?

Hi @kittylion and welcome to the Dash community :slight_smile:

Are you using dcc.Markdown? I tried this and it worked fine

 dcc.Markdown(" This is a date(≤ 20240101)"),

When dealing with special characters in Markdown, especially those that might clash with formatting, you can use escaping. Escaping involves adding a backslash () before the character you want to display as plain text rather than having it perform its usual function.

In your case, you want to display the “less than or equal to” symbol (≤) without it being interpreted as a formatting command. Here’s how you can do it:

Use the backslash () before the special character:
date(<=20240101)

The rendered output will now correctly show:
date(≤20240101)