模板:Hcdiff:修订间差异
来自康健生活
创建页面,内容为“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…” |
无编辑摘要 |
||
| 第10行: | 第10行: | ||
* {{ic|3}} or {{ic|output2}}: the code in the bottom right pane | * {{ic|3}} or {{ic|output2}}: the code in the bottom right pane | ||
<nowiki>{{ | <nowiki>{{hcdiff|main.h|#include <stdio.h>|#include2 <stdio2.h>}}</nowiki> | ||
<nowiki>{{ | <nowiki>{{hcdiff|head=main.h|output=<syntaxhighlight lang="bash"> | ||
#include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash"> | #include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash"> | ||
#include2 <stdio2.h></syntaxhighlight>}}</nowiki> | #include2 <stdio2.h></syntaxhighlight>}}</nowiki> | ||
| 第18行: | 第18行: | ||
==Example== | ==Example== | ||
{{ | {{hcdiff|head=main.h|output=<syntaxhighlight lang="bash"> | ||
#include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash"> | #include <stdio.h></syntaxhighlight>|output2=<syntaxhighlight lang="bash"> | ||
#include2 <stdio2.h></syntaxhighlight>}} | #include2 <stdio2.h></syntaxhighlight>}} | ||
2020年2月21日 (五) 15:26的版本
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
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
检测到模板循环:模板:Hcdiff