<pre>
tags are lined up with my bullet indents in the code preview, but not in the answer.
2 Answers
Indent 8 spaces if you want code inside bulleted lists.
See https://superuser.com/editing-help for details.
-
This solves my problem as far as usability goes, so I'll accept your answer, but I still don't know why the preview would differ from the actual post.– GruzzlesCommented Aug 1, 2011 at 21:07
Using Nested <ul>
and <li>
tags:
Code:
<ul>
<li>bullet 1
<pre>code 1</pre>
<ul>
<li>subpoint 2
<pre>code 2</pre>
</li>
</ul>
</li>
</ul>
Result:
- bullet 1
code 1
- subpoint 2
code 2
- subpoint 2
Using Markdown Formatting:
Code:
- bullet 1
<pre>code 1</pre>
- bullet 2
<pre>code2</pre>
Result:
- bullet 1
code 1
- bullet 2
code2
- bullet 2
<pre>
instead of backticks(``)?