Why does Markdown to HTML sometimes produce verbatim Markdown in <pre> tags?

Hi,

I use Markdown to HTMl in my flow na most of the time it works. However, once in a while it produces markdown tags within PRE html tags like this:

image

I don’t do anything different in my code. It’ll work correctly and then, for some reason, it doesn’t.

Is there a way to make sure it never starts with a PRE tag? Or is the only way to add another filter (like a regexp) that removes it if it happens?

Thanks,

L

Perhaps this is because you have spaces/indentation before each line of your text?

You can use the built-in function replace to strip the tags from your output HTML.

For more information, see the replace function documentation in the Help Center.

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

2 Likes

Ahh, I think I found the culprit. Claude sometimes outputs

"data": "```markdown\n# L'intelligence …"

and other times:

"data": "# L'intelligence …"

So the prompt seems to be the culprit.

Thanks!

L

2 Likes