Changes

Jump to navigation Jump to search

Template:Q

967 bytes added, 03:57, 15 April 2020
no edit summary
<code><nowiki>{{q|25|Isn't this nice?}}</nowiki></code><br>
It will automatically link the question to the 25 paragraph.
== Tests ==
{| class="wikitable"
|-
! Code !! Expected !! Actual
|-
| <code><nowiki>{{q|1|Isn't this nice?}}</nowiki></code> || <div id="question1">[[#paragraph1|1 Isn't this nice?]]</div>
|| {{q|1|Isn't this nice?}}
|-
| <code><nowiki>{{q|25|Isn't this nice?}}</nowiki></code> || <div id="question25">[[#paragraph25|25 Isn't this nice?]]</div>
|| {{q|25|Isn't this nice?}}
|-
| <code><nowiki>{{q|105|Isn't this nice?}}</nowiki></code> || <div id="question105">[[#paragraph105|105 Isn't this nice?]]</div>
|| {{q|105|Isn't this nice?}}
|}
= One question - multiple paragraphs =
<code><nowiki>{{q|25-27|Isn't this nice?}}</nowiki></code><br>
It will automatically link the question to the 25 paragraph.
== Tests ==
{| class="wikitable"
|-
! Code !! Expected !! Actual
|-
| <code><nowiki>{{q|7-9|Isn't this nice?}}</nowiki></code> || <div id="question7-9">[[#paragraph7|7-9 Isn't this nice?]]</div> || {{q|7-9|Isn't this nice?}}
= Tests === One question |- one paragraph ==Code:<br>| <code><nowiki>{{q|257-10|Isn't this nice?}}</nowiki></code>|| <div id="question7-10">[[#paragraph7|7-10 Isn't this nice?]]</div> || {{q|7-10|Isn't this nice?}}
Expected:|-| <code><nowiki>{{q|10-12|Isn't this nice?}}</nowiki></code> || <div id="question25question10-12">[[#paragraph25paragraph10|25 10-12 Isn't this nice?]]</div>Actual: {{q |25|Isn't this nice?}}== One question - multiple paragraphs ===== Number of first paragraph of one digit ===Code:<br><code><nowiki>{{q|710-1012|Isn't this nice?}}</nowiki></code>
Expected:|-| <code><nowiki>{{q|99-101|Isn't this nice?}}</nowiki></code> || <div id="question7question99-10101">[[#paragraph7paragraph99|799-10 101 Isn't this nice?]]</div>Actual: || {{q|99-101|Isn't this nice?}} |-| <code><nowiki>{{q|7101-10105|Isn't this nice?}}</nowiki></code> || <div id="question101-105">[[#paragraph101|101-105 Isn't this nice?]]</div> || {{q|101-105|Isn't this nice?}}|}</noinclude><includeonly><div id="question{{{1}}}">[[#paragraph{{#invoke:stringHelpers|getParagraphFromQuestion|{{{1}}} }}|{{{1}}} {{{2}}}]]</div></includeonly>

Navigation menu