String interpolation in markdown admonition in Pluto

In Pluto, the following code snippet fails to properly interpolate the values. How to fix it?

begin
	todo_index = 3
	md"""
	!!! todo "Todo $(todo_index)"
		This is todo #$(todo_index)
	"""
end

Use Markdown.parse("a $b") rather than md"a $b" . The string macro is finicky with interpolations, because it’s expecting $$ to be a math delimiter. Super annoying.

1 Like

I updated it as follows and it works perfectly.

begin
	todo_index = 3
	Markdown.parse("""
		!!! todo "Todo $(todo_index)"
			This is todo #$(todo_index)
		""")
end

Thank you, @gustaphe