模板:Hcdiff:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
创建页面,内容为“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…”
 
Kangkk​(留言 | 贡献)
无编辑摘要
第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>{{hc|main.h|#include <stdio.h>|#include2 <stdio2.h>}}</nowiki>
  <nowiki>{{hcdiff|main.h|#include <stdio.h>|#include2 <stdio2.h>}}</nowiki>


  <nowiki>{{hc|head=main.h|output=<syntaxhighlight lang="bash">
  <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==


{{hc|head=main.h|output=<syntaxhighlight lang="bash">
{{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.

Usage

  • 1 or head: the code in the top pane
  • 2 or output: the code in the bottom left pane
  • 3 or output2: 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.

Usage

  • 1 or head: the code in the top pane
  • 2 or output: the code in the bottom left pane
  • 3 or output2: 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