Difference between revisions of "Template:Blockquote paragraphs"
en>Gadget850 m (fix breaks) |
en>Nnemo (Notably — Accessibility. Let's not mislead the user.) |
||
| Line 1: | Line 1: | ||
| − | <div style="float:right; padding:0 1em;">{{navbar|Blockquote paragraphs|plain=y}}</div> | + | <div style="float: right; padding: 0 1em;">{{navbar|Blockquote paragraphs|plain=y}}</div> |
Due to the utterly intractable [[MediaWiki]] bug reported at {{bugzilla|6200}}, and still unfixed {{as of|February 2012|lc=y}}, block quoting on Wikipedia, with or without a template, cannot handle freeform linebreaking for paragraphs and poems and the like, unless formatted one very specific (and annoying) way. It's not a problem of blockquote templates, but all uses of {{tag|blockquote|open}}. | Due to the utterly intractable [[MediaWiki]] bug reported at {{bugzilla|6200}}, and still unfixed {{as of|February 2012|lc=y}}, block quoting on Wikipedia, with or without a template, cannot handle freeform linebreaking for paragraphs and poems and the like, unless formatted one very specific (and annoying) way. It's not a problem of blockquote templates, but all uses of {{tag|blockquote|open}}. | ||
| Line 5: | Line 5: | ||
The intuitive choice: | The intuitive choice: | ||
| − | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br /> | + | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br /> |
| − | Line 2<br /> | + | Line 2 <br /> |
| − | Line 3<br /> | + | Line 3 <br /> |
Line 4}}</code></blockquote> | Line 4}}</code></blockquote> | ||
| Line 19: | Line 19: | ||
Blank lines seem to work at first: | Blank lines seem to work at first: | ||
| − | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br /> | + | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br /> |
<br /> | <br /> | ||
| − | Line 2<br /> | + | Line 2 <br /> |
<br /> | <br /> | ||
| − | Line 3<br /> | + | Line 3 <br /> |
<br /> | <br /> | ||
Line 4}}</code></blockquote> | Line 4}}</code></blockquote> | ||
| Line 37: | Line 37: | ||
Line 4}} | Line 4}} | ||
| − | Yet this markup fails with | + | Yet this markup fails with wiki ":" citation: |
:{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 | ||
| Line 49: | Line 49: | ||
Just trying to use {{tag|p}} or {{tag|br|single}} markup won't solve all the problems: | Just trying to use {{tag|p}} or {{tag|br|single}} markup won't solve all the problems: | ||
| − | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br/><br /> | + | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br/><br /> |
| − | Line 2<br/><br /> | + | Line 2 <br/><br /> |
| − | Line 3<br/><br /> | + | Line 3 <br/><br /> |
Line 4}}</code></blockquote> | Line 4}}</code></blockquote> | ||
results in odd spacing, with the middle blocks too close together: | results in odd spacing, with the middle blocks too close together: | ||
| − | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br /> | + | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br /> |
| − | Line 2<br /> | + | Line 2 <br /> |
| − | Line 3<br /> | + | Line 3 <br /> |
Line 4}} | Line 4}} | ||
| − | Meanwhile this version seems | + | Meanwhile this version seems OK at first: |
<blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|<p>Line 1</p><br /> | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|<p>Line 1</p><br /> | ||
| Line 73: | Line 73: | ||
<p>Line 4</p>}} | <p>Line 4</p>}} | ||
| − | but again can't be indented: | + | but again can't be indented in citation: |
:{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|<p>Line 1</p> | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|<p>Line 1</p> | ||
| Line 84: | Line 84: | ||
{{As of|February 2012}}, the {{em|only}} solution for the problem is to use {{em|unbroken markup}} with {{tag|p}} or {{tag|br|single}} elements (or others, like nested blockquotes and lists): | {{As of|February 2012}}, the {{em|only}} solution for the problem is to use {{em|unbroken markup}} with {{tag|p}} or {{tag|br|single}} elements (or others, like nested blockquotes and lists): | ||
| − | :{{tnull|<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br/>Line 2<br/>Line 3<br/>Line 4.}} | + | :{{tnull|<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br/>Line 2 <br/>Line 3 <br/>Line 4.}} |
which, while hard to read, especially for long content, results in the expected: | which, while hard to read, especially for long content, results in the expected: | ||
| − | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br />Line 2<br />Line 3<br />Line 4.}} | + | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br />Line 2 <br />Line 3 <br />Line 4.}} |
| − | And it {{em|does}} work with | + | And it {{em|does}} work with wikimarkup ":" citation, unlike the failed test cases hereinbefore: |
| − | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br />Line 2<br />Line 3<br />Line 4.}} | + | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 <br />Line 2 <br />Line 3 <br />Line 4.}} |
| − | Happily, there is an HTML | + | Happily, there is an [[HTML]] comment workaround for readability that lets you do whatever you want: |
<blockquote><code><nowiki> | <blockquote><code><nowiki> | ||
{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!--<br /> | {{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!--<br /> | ||
| − | -->Line 1<br/><!--<br /> | + | -->Line 1 <br/><!--<br /> |
| − | -->Line 2<br/><!--<br /> | + | -->Line 2 <br/><!--<br /> |
| − | -->Line 3<br/><!--<br /> | + | -->Line 3 <br/><!--<br /> |
-->Line 4.}} | -->Line 4.}} | ||
</code></blockquote> | </code></blockquote> | ||
| Line 109: | Line 109: | ||
{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!--<br /> | {{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!--<br /> | ||
<br /> | <br /> | ||
| − | -->Line 1<br/><!--<br /> | + | -->Line 1 <br/><!--<br /> |
<br /> | <br /> | ||
| − | -->Line 2<br/><!--<br /> | + | -->Line 2 <br/><!--<br /> |
<br /> | <br /> | ||
| − | -->Line 3<br/><!--<br /> | + | -->Line 3 <br/><!--<br /> |
<br /> | <br /> | ||
-->Line 4.}} | -->Line 4.}} | ||
| Line 122: | Line 122: | ||
{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | ||
| − | -->Line 1<br /><!-- | + | -->Line 1 <br /><!-- |
| − | -->Line 2<br /><!-- | + | -->Line 2 <br /><!-- |
| − | -->Line 3<br /><!-- | + | -->Line 3 <br /><!-- |
-->Line 4.}} | -->Line 4.}} | ||
| − | They {{em|are}} | + | They {{em|are}} citable: |
:{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | ||
| − | -->Line 1<br /><!-- | + | -->Line 1 <br /><!-- |
| − | -->Line 2<br /><!-- | + | -->Line 2 <br /><!-- |
| − | -->Line 3<br /><!-- | + | -->Line 3 <br /><!-- |
-->Line 4.}}<noinclude> | -->Line 4.}}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
| − | <!-- Categories and interwikis go on the /doc subpage. --> | + | <!-- Categories and interwikis links go on the /doc subpage. --> |
</noinclude> | </noinclude> | ||
Revision as of 16:25, 6 April 2013
Due to the utterly intractable MediaWiki bug reported at Template:Bugzilla, and still unfixed Template:As of, block quoting on Wikipedia, with or without a template, cannot handle freeform linebreaking for paragraphs and poems and the like, unless formatted one very specific (and annoying) way. It's not a problem of blockquote templates, but all uses of <blockquote>.
The intuitive choice:
{{bq|Line 1
Line 2
Line 3
Line 4}}
results in the mangled:
Blank lines seem to work at first:
{{bq|Line 1
Line 2
Line 3
Line 4}}
though with quite tall spacing between the content blocks (lines, in our test cases):
Yet this markup fails with wiki ":" citation:
Just trying to use <p>...</p> or <br /> markup won't solve all the problems:
{{bq|Line 1 <br/>
Line 2 <br/>
Line 3 <br/>
Line 4}}
results in odd spacing, with the middle blocks too close together:
Meanwhile this version seems OK at first:
{{bq|<p>Line 1</p>
<p>Line 2</p>
<p>Line 3</p>
<p>Line 4</p>}}
but again can't be indented in citation:
Template:As of, the Template:Em solution for the problem is to use Template:Em with <p>...</p> or <br /> elements (or others, like nested blockquotes and lists):
which, while hard to read, especially for long content, results in the expected:
And it Template:Em work with wikimarkup ":" citation, unlike the failed test cases hereinbefore:
Happily, there is an HTML comment workaround for readability that lets you do whatever you want:
{{bq|1=<!--
-->Line 1 <br/><!--
-->Line 2 <br/><!--
-->Line 3 <br/><!--
-->Line 4.}}
or even:
{{bq|1=<!--
-->Line 1 <br/><!--
-->Line 2 <br/><!--
-->Line 3 <br/><!--
-->Line 4.}}
which results in the expected:
They Template:Em citable:
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}