- このヘルプには更新、または翻訳されていないコンテンツがあります。どなたでも翻訳にご協力いただくことができます。
- 原文 : w:c:help:Extension:SyntaxHighlight。
SyntaxHighlight, formerly known as SyntaxHighlight_GeSHi, is an extension that adds syntax highlighting based on the Pygments syntax highlighting library.
Usage[]
<syntaxhighlight> code here </syntaxhighlight>
Parameters[]
lang=- The code's language to determine the highlighting algorithm. For a full list of supported languages, see the Pygments documentation.
line- Enables line numbers.
start=- Starting number for the line numbers, if
lineis enabled.
highlight=- Comma-separated list of lines to add background highlighting.
inline- Display the code block inline with surrounding text.
class=- Adds CSS classes to the code block to allow for additional styling.
style=- Adds inline CSS styles to the code block.
Examples[]
lang[]
<syntaxhighlight lang="css">
Result:
div.skill-table {
margin: 2.1rem;
border-collapse:collapse;
}
line[]
<syntaxhighlight lang="css" line>
Result:
div.skill-table {
margin: 2.1rem;
border-collapse:collapse;
}
start[]
<syntaxhighlight lang="css" line start=5>
Result:
div.skill-table {
margin: 2.1rem;
border-collapse:collapse;
}
highlight[]
<syntaxhighlight lang="css" highlight="1,4">
Result:
div.skill-table {
margin: 2.1rem;
border-collapse:collapse;
}
inline[]
<syntaxhighlight lang="css" inline>
Result:
div.skill-table { margin: 2.1rem; border-collapse:collapse; }
関連情報[]
その他のヘルプとフィードバック[]
- ヘルプ:コンテンツでは、他のヘルプページを閲覧、検索することができます。
- 最新の情報やヘルプについては、コミュニティセントラルをご覧ください。
- この記事で不明確な点や、曖昧な点がございましたら、Fandomとの連絡方法をご確認ください。
- このヘルプはコミュニティセントラル内にて管理されています。