模板:Hcdiff:修订间差异
来自康健生活
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
<noinclude>{{Documentation}}</noinclude><includeonly><div class="wiki-hc-background"><pre<noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding-bottom:0.8em;background-color: #ffffff;">{{{head|{{{1|{{META Error}}}}}}}}</pre<noinclude></noinclude>><!-- The line break is needed, otherwise the wiki will generate extraneous paragraphs inside the 2nd pre block --> | <noinclude>{{Documentation}}</noinclude><includeonly><div class="wiki-hc-background"><pre<noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding-bottom:0.8em;background-color: #ffffff;">{{{head|{{{1|{{META Error}}}}}}}}</pre<noinclude></noinclude>><!-- The line break is needed, otherwise the wiki will generate extraneous paragraphs inside the 2nd pre block --> | ||
<div class="wiki-hcdiff-main" style="display:flex;"><div style="margin-top: 0 | <div class="wiki-hcdiff-main" style="display:flex;"><div style="margin-top:0;flex:1;">{{{output|{{{2|{{META Error}}}}}}}}</div><div style="margin-top:0;flex:1;">{{{output2|{{{3|{{META Error}}}}}}}}</div></div></div></includeonly> | ||
2020年2月21日 (五) 15:32的版本
这个文档嵌入自模板:Hcdiff/doc
。
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>