4

ウィキとウィキペディアはまだエリア51にありますが、クレオールウィキマークアップの使用についてこの質問をしたいと思います。私は次のコードを持っています:

# Initial instructions here.
# Some instructions here. See code snippet below.
{{{
#!python

def foo():
  return bar
}}}
# More instructions here. Why does the numbering restart at 1?
# Final instructions.

そのコードを解析すると、次のようになります。

1.ここでの最初の指示。
2.ここにいくつかの指示。以下のコードスニペットを参照してください。
def foo():
  リターンバー
1.ここでさらに継続的な指示。番号付けが1から再開するのはなぜですか?
2.最終的な指示。

質問:コードスニペットの下のリストアイテムが1から再開されないように、リスト内にコードスニペットを埋め込むにはどうすればよいですか?

4

1 に答える 1

0

インラインの整形済みテキストはリストで機能します。これを使用して、各行を区切ることでブロックのプリフォーマットを近似できます。これは優れた解決策ではありませんが、場合によってはうまくいくかもしれません。

# Initial instructions here.
# Some instructions here. See code snippet below.
** {{{#!python}}}
** {{{}}}
** {{{def foo():}}}
** {{{  return bar}}}
# More instructions here. Why does the numbering restart at 1?
# Final instructions.

収量:

<ol>
	<li>Initial instructions here.</li>
	<li>Some instructions here. See code snippet below.
	<ul>
		<li><tt>#!python</tt></li>
		<li><tt></tt></li>
		<li><tt>def foo():</tt></li>
		<li><tt>  return bar</tt></li>
	</ul></li>
	<li>More instructions here. Why does the numbering restart at 1?</li>
	<li>Final instructions.</li>
</ol>

于 2016-06-18T20:05:51.160 に答える