2011-07-26 4 views
4

Wikis and Wikipediaはまだエリア51にありますが、この質問にはCreole wikiマークアップの使用について質問したいと思います。そのコードが解析されるとリスト内のコードスニペット(Creole wiki)

# 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(): 
    return bar 
1.ここではさらに詳しい説明があります。なぜ番号付けは1で再開しますか?
2.最終的な指示。

質問:コードスニペットの下にあるリスト項目が1で再開しないように、コードスニペットをリストに埋め込むにはどうすればよいですか?

+0

あなたがこれを理解しましたか? – glopes

答えて

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. 

Yeilds:

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

関連する問題