Template:Source: Difference between revisions

From Omega Wiki
Jump to navigation Jump to search
m 修正源码引用模板的条件语法,使文件行号锚点正确渲染
m 修正源码引用模板的条件语法,使文件行号锚点正确渲染
 
Line 1: Line 1:
<includeonly>[https://github.com/geoffdunbar/winomega/blob/{{{commit|009707d17482b977061a6223b9de63eac4d368c3}}}/{{{1}}}{{#if: {{{2|}}} | #L{{{2}}}{{#if: {{{3|}}} | -L{{{3}}} }} }} {{{1}}} in Omega {{{version|0.90.4}}}{{#if: {{{2|}}} | , {{#if: {{{3|}}} | lines {{{2}}}&ndash;{{{3}}} | line {{{2}}} }} }}]</includeonly><noinclude>Links a source file at a fixed revision. Use inside a Cite footnote, for example <code><nowiki><ref>{{Source|effect1.c|494|549}} Identification.</ref></nowiki></code>. Parameters 1, 2 and 3 are the file, starting line and optional ending line. Override both <code>version</code> and <code>commit</code> when citing another verified version.</noinclude>
<includeonly>[https://github.com/geoffdunbar/winomega/blob/{{{commit|009707d17482b977061a6223b9de63eac4d368c3}}}/{{{1}}}#{{#if: {{{2|}}} | L{{{2}}}{{#if: {{{3|}}} | -L{{{3}}} }} }} {{{1}}} in Omega {{{version|0.90.4}}}{{#if: {{{2|}}} | , {{#if: {{{3|}}} | lines {{{2}}}&ndash;{{{3}}} | line {{{2}}} }} }}]</includeonly><noinclude>Links a source file at a fixed revision. Use inside a Cite footnote, for example <code><nowiki><ref>{{Source|effect1.c|494|549}} Identification.</ref></nowiki></code>. Parameters 1, 2 and 3 are the file, starting line and optional ending line. Override both <code>version</code> and <code>commit</code> when citing another verified version. Keep the URL's hash outside parser functions to avoid MediaWiki inserting a list before the anchor.</noinclude>

Latest revision as of 07:04, 9 September 2026

Links a source file at a fixed revision. Use inside a Cite footnote, for example <ref>{{Source|effect1.c|494|549}} Identification.</ref>. Parameters 1, 2 and 3 are the file, starting line and optional ending line. Override both version and commit when citing another verified version. Keep the URL's hash outside parser functions to avoid MediaWiki inserting a list before the anchor.