Wiki でシンタックス ハイライトを使用する
You can highlight snippets of text on your Bitbucket Cloud wiki pages. We use the excellent Pygments library to style our code.
The syntax you use to format the code block depends on the language you choose for your wiki. To check the language, select Edit at the top right of you wiki page and look for the Language dropdown.
次に上記のように、コードを整形するために適切なシンタックスを使用します。
マークダウン | Creole |
|---|---|
```python
def wiki_rocks(text):
formatter = lambda t: "funky"+t
return formatter(text)
```シバンにトリプル バッククォートを使用した言語の指定はサポートされなくなりました。代わりに、上記の例に示すように、言語にトリプル バッククォートを使用します。 | {{{
#!python
def wiki_rocks(text):
formatter = lambda t: "funky"+t
return formatter(text)
}}} |
Textile | reStructuredText |
bc. #!python
def wiki_rocks(text):
formatter = lambda t: "funky"+t
return formatter(text) | .. sourcecode :: python
def wiki_rocks(text):
formatter = lambda t: "funky"+t
return formatter(text) |
For details on the various languages, see their corresponding documentation on the web. See the library of Pygment lexers. Bitbucket Cloud supports the short name or the mimetype of anything in that library.
この内容はお役に立ちましたか?