Difference between revisions of "Template:Blockquote paragraphs"
en>SMcCandlish (typo) |
en>SMcCandlish (update) |
||
| Line 1: | Line 1: | ||
| − | Due to the utterly intractable [[MediaWiki]] bug reported at {{bugzilla|6200}}, block quoting cannot handle freeform linebreaking for paragraphs and poems and the like. | + | 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. x |
| − | The problem in action:<code> | + | The problem in action: |
| − | <blockquote><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br/><br /> | + | |
| + | The intuitive choice: | ||
| + | |||
| + | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br /> | ||
| + | Line 2<br /> | ||
| + | Line 3<br /> | ||
| + | Line 4}}</code></blockquote> | ||
| + | |||
| + | results in the mangled: | ||
| + | |||
| + | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 | ||
| + | Line 2 | ||
| + | Line 3 | ||
| + | Line 4}} | ||
| + | |||
| + | Blank lines seem to work at first: | ||
| + | |||
| + | <blockquote><code><nowiki>{{</nowiki><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br /> | ||
| + | <br /> | ||
| + | Line 2<br /> | ||
| + | <br /> | ||
| + | Line 3<br /> | ||
| + | <br /> | ||
| + | Line 4}}</code></blockquote> | ||
| + | |||
| + | though with quite tall spacing between the content blocks (lines, in our test cases): | ||
| + | |||
| + | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 | ||
| + | |||
| + | Line 2 | ||
| + | |||
| + | Line 3 | ||
| + | |||
| + | Line 4}} | ||
| + | |||
| + | Yet this markup fails with wiki ":" indentation: | ||
| + | |||
| + | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1 | ||
| + | |||
| + | Line 2 | ||
| + | |||
| + | Line 3 | ||
| + | |||
| + | Line 4}} | ||
| + | |||
| + | 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 /> | ||
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: | ||
| + | |||
{{<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 12: | Line 61: | ||
Line 4}} | Line 4}} | ||
| − | The {{em|only}} solution for this is to use unbroken markup with {{tag|p}} or {{tag|br|single}} elements: | + | Meanwhile this version again seems ok: |
| + | |||
| + | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|<p>Line 1</p> | ||
| + | <p>Line 2</p> | ||
| + | <p>Line 3</p> | ||
| + | <p>Line 4</p>}} | ||
| + | |||
| + | but again can't be indented: | ||
| + | |||
| + | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|<p>Line 1</p> | ||
| + | <p>Line 2</p> | ||
| + | <p>Line 3</p> | ||
| + | <p>Line 4</p>}} | ||
| + | |||
| + | The {{em|only}} solution for this 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: | ||
| + | |||
{{<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 {{em|can}} be indented: | |
| + | |||
| + | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|Line 1<br/>Line 2<br/>Line 3<br/>Line 4.}} | ||
| + | |||
| + | Happily, there is an HTML-comment workaround for readability that lets you do whatever you want: | ||
<blockquote><code><nowiki> | <blockquote><code><nowiki> | ||
| Line 27: | Line 97: | ||
</code></blockquote> | </code></blockquote> | ||
| − | + | or even: | |
<blockquote><code><nowiki> | <blockquote><code><nowiki> | ||
| Line 41: | Line 111: | ||
</code></blockquote> | </code></blockquote> | ||
| − | + | which results in the expected: | |
{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | {{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | ||
| Line 51: | Line 121: | ||
-->Line 3<br/><!-- | -->Line 3<br/><!-- | ||
| − | -->Line 4.}}<noinclude> | + | -->Line 4.}} |
| + | |||
| + | They {{em|are}} indentable: | ||
| + | |||
| + | :{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>bq</noinclude>|1=<!-- | ||
| + | -->Line 1<br/><!-- | ||
| + | -->Line 2<br/><!-- | ||
| + | -->Line 3<br/><!-- | ||
| + | -->Line 4.}} | ||
| + | |||
| + | <noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
<!--Categories and interwikis go on the /doc subpage.--> | <!--Categories and interwikis go on the /doc subpage.--> | ||
</noinclude> | </noinclude> | ||
Revision as of 22:39, 2 February 2012
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. x
The problem in action:
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 ":" indentation:
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 again seems ok:
but again can't be indented:
The Template:Em solution for this 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 Template:Em be indented:
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 indentable:
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}