Open main menu

Changes

Template:P

740 bytes added, 04:26, 1 April 2020
no edit summary
=== Example action ===
It will automatically link paragraph 7 to a question that links itself to paragraphs 7 and 8.
 
= Tests =
== Paragraph points to a simple question ==
Code:<br>
<code><nowiki>{{p|7|This is the actual paragraph text.}}</nowiki></code>
 
Expected:
<div style="text-align:justify;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[#question7|<sup id="paragraph7">7</sup>]] This is the actual paragraph text.</div>
Actual:
{{p|7|This is the actual paragraph text.}}<br>
 
== Paragraph points to a complex question ==
Code:<br>
<code><nowiki>{{p|7|7-8|This is the actual paragraph text.}}
</nowiki></code>
 
Expected:
<div style="text-align:justify;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[#question7-8|<sup id="paragraph7">7</sup>]] This is the actual paragraph text.</div>
Actual:
{{p|7|7-8|This is the actual paragraph text.}}
</noinclude>
<includeonly>{{#if: {{{3|}}}|<div style="text-align:justify;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[#question{{{2}}}|<sup id="paragraph{{{1}}}">{{{1}}}</sup>]] {{{3}}}</div>|<div style="text-align:justify;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[#question{{{1}}}|<sup id="paragraph{{{1}}}">{{{1}}}</sup>]] {{{2}}}</div>}}</includeonly>