How to escape {% in markdown?

when I use {% in code, e.g.

{% block content %}

I get the error

Liquid Exception: Liquid syntax error (line 21): Unknown tag 'block' in ...

It’s OK if I use

{\% block content %}

But the backslash appears in the html

Any help appreciated

You need to wrap your Liquid with the {% raw %} and {% endraw %} tags.

{% raw %}{% block content %}{% endraw %}

perfect. Thank you. So much to learn