模板:Hcdiff/doc:修订间差异
来自康健生活
创建页面,内容为“<noinclude>{{Documentation}}</noinclude><includeonly><div class="wiki-hc-background"><pre<noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding…” |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
< | Block code with header. | ||
* Use [[Template:bc]] for block code without header. | |||
* Use [[Template:ic]] for inline code. | |||
==Usage== | |||
* {{ic|1}} or {{ic|head}}: the code in the top pane | |||
* {{ic|2}} or {{ic|output}}: the code in the bottom left pane | |||
* {{ic|3}} or {{ic|output2}}: the code in the bottom right pane | |||
<nowiki>{{hcdiff|main.h|#include <stdio.h>|#include2 <stdio2.h>}}</nowiki> | |||
<nowiki>{{hcdiff|head=main.h|output=<syntaxhighlight lang="bash"> | |||
#include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash"> | |||
#include2 <stdio2.h></syntaxhighlight>}}</nowiki> | |||
==Example== | |||
{{hcdiff|head=main.h|output=<syntaxhighlight lang="bash"> | |||
#include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash"> | |||
#include2 <stdio2.h></syntaxhighlight>}} | |||
<!-- 本行下加入模板(Documentation)的分类 --> | |||
<includeonly>[[Category:工具模板]]</includeonly> | |||
<!-- 本行下加入模板的子页面(Documentation/doc)分类 --> | |||
<noinclude>[[Category:模板说明文件]]</noinclude> | |||
2020年2月21日 (五) 15:28的最新版本
Block code with header.
- Use Template:bc for block code without header.
- Use Template:ic for inline code.
Usage
1orhead: the code in the top pane2oroutput: the code in the bottom left pane3oroutput2: the code in the bottom right pane
{{hcdiff|main.h|#include <stdio.h>|#include2 <stdio2.h>}}
{{hcdiff|head=main.h|output=<syntaxhighlight lang="bash">
#include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash">
#include2 <stdio2.h></syntaxhighlight>}}
Example
main.h
#include <stdio.h>
#include2 <stdio2.h>