Diary

Preserving indentation in WordPress posts with SyntaxHighlighter and similar

1 Mins read

The problem: you carefully indent your source code with tabs or spaces to keep it clean, but WordPress cheerfully strips it all out when you publish.

The answer: wrap it in `

`.

<pre>
	[specify language]
	source code
	[/specify language]
</pre>