Reputation: 979
I am trying to embed a <pre>
tag in within an ordered list, of the form:
# Some content
#: <pre>
Some pre-formatted content
</pre>
But it doesn't work. Can someone please let me know on how to achieve what I am trying to do?
Upvotes: 6
Views: 3490
Reputation: 42751
The solution I got from this answer at Webmasters SE works for me:
# Some content
# <source>
Some pre-formatted content
</source>
# Some more content
Although the <source>
tag is deprecated and modern markup should look like this:
# Some content
# <syntaxhighlight>
Some pre-formatted content
</syntaxhighlight>
# Some more content
If your pre content is code, you can use a language such as <syntaxhighlight lang="php">
to get syntax highlighting.
Upvotes: 1
Reputation: 144
This is the better answer for continuing a numbered list after using the <pre> tag without resorting to html:
# one
#:<pre>
#:some stuff
#:some more stuff</pre>
# two
Produces:
some stuff some more stuff
Upvotes: -2
Reputation: 28220
You can use a regular HTML list:
<ol>
<li>Some Content</li>
<li><dl><dd><pre>Some pre-formatted content</pre></dd></dl></li>
</ol>
Upvotes: 6