How to preserve tabs in content?

Hi, I have this as content:

	this text have a tab
	this too
but not this

When building the blog Hugo removes the tabs.
It then becomes like this:

<pre></code>
this text have a tab
this too
</code></pre>
<p>but not this</p>

it works if I put two tabs:

		this has two tabs.

becomes:

<pre><code>
	this has two tabs.
</code></pre>

How to preserve the tabs? Looks like it removes the first tab.
Thank you.

Hugo respects Commonmark syntax.

https://spec.commonmark.org/0.30/#tabs

Thank you for your reply.
So, this is hardcoded, right? I don’t find a way to customize it.

You cannot customize this behavior. It is a markdown standard. A leading tab indicates an indented code block.

2 Likes

Besides, there is no sense in keeping tabs in html outside a pre element…

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.