Your use of the HTML tags on their own lines causes problems
You wrote:
Testing with `<code>` then `<pre>`
<code>
<pre>
Class *instance = [[Class alloc] init];
[instance method];
</pre>
</code>
Testing with `<pre>` then `<code>`
<pre>
<code>
Class *instance = [[Class alloc] init];
[instance method];
</code>
</pre>
which produced:
Testing with <code>
then <pre>
Class *instance = [[Class alloc] init];
[instance method];
Testing with <pre>
then <code>
Class *instance = [[Class alloc] init];
[instance method];
Fixing the problems by removing line breaks
As you can see, this caused problems. Mostly, that the newline between the tags are being parsed and producing spurious line breaks. Instead, use one of the following methods:
Testing with `<code>` then `<pre>`:
<code><pre>Class *instance = [[Class alloc] init];
[instance method];
</pre></code>
Testing with `<pre>` then `<code>`:
<pre><code>Class *instance = [[Class alloc] init];
[instance method];
</code></pre>
which produces:
Testing with <code>
then <pre>
:
Class *instance = [[Class alloc] init];
[instance method];
Testing with <pre>
then <code>
:
Class *instance = [[Class alloc] init];
[instance method];
Additional remarks
Just <code>
requires two spaces at the end of each line, so it's probably not useful.
Incedentally, the Markdown method causes the parser to generate the following HTML:
<pre><code>Class *instance = [[Class alloc] init];
[instance method];
</code></pre>
so you should probably use that method.
{}
button in the editor to indent a block at once. Even has a keyboard shortcutCtrl+K
(on PCs, not sure about Macs).