Difference between revisions of "Template:Blockquote paragraphs"

From D&D 5e
Jump to: navigation, search
(note)
(typo)
Line 1: Line 1:
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=y}}.
+
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}}.
  
 
{{collapse top|title=<div style="text-align: left;">The problem in action: test cases that seem like they should work but fail</div>|bg=#EEEEEE|bg2=#ECFCF4}}<div class="collapse-workaround">
 
{{collapse top|title=<div style="text-align: left;">The problem in action: test cases that seem like they should work but fail</div>|bg=#EEEEEE|bg2=#ECFCF4}}<div class="collapse-workaround">

Revision as of 20:36, 3 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, unless formatted one very specific (and annoying) way. It's not a problem of blockquote templates, but all uses of {{#if:|

|

}}{{#switch:open

|c|close  = 
|s|single
|o|open
|p|pair   = <blockquote{{#if:| {{{params}}}}}

}}{{#switch:open

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:open

|s|single
|o|open   = 
|c|close
|p|pair   = </blockquote>

}}{{#if:|

|

}}.

Template:Collapse top

The intuitive choice:

{{bq|Line 1

Line 2
Line 3

Line 4}}

results in the mangled:

Template:Bq

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):

Template:Bq

Yet this markup fails with wiki ":" indentation:

Template:Bq

Just trying to use {{#if:|

|

}}{{#switch:pair

|c|close  = 
|s|single
|o|open
|p|pair   = <p{{#if:| {{{params}}}}}

}}{{#switch:pair

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:pair

|s|single
|o|open   = 
|c|close
|p|pair   = </p>

}}{{#if:|

|

}} or {{#if:|

|

}}{{#switch:single

|c|close  = 
|s|single
|o|open
|p|pair   = <br{{#if:| {{{params}}}}}

}}{{#switch:single

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:single

|s|single
|o|open   = 
|c|close
|p|pair   = </br>

}}{{#if:|

|

}} 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:

Template:Bq

Meanwhile this version seems ok at first:

{{bq|<p>Line 1</p>

<p>Line 2</p>
<p>Line 3</p>

<p>Line 4</p>}}

Template:Bq

but again can't be indented:

Template:Bq

Template:Collapse bottom

Template:As of, the Template:Em solution for the problem is to use Template:Em with {{#if:|

|

}}{{#switch:pair

|c|close  = 
|s|single
|o|open
|p|pair   = <p{{#if:| {{{params}}}}}

}}{{#switch:pair

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:pair

|s|single
|o|open   = 
|c|close
|p|pair   = </p>

}}{{#if:|

|

}} or {{#if:|

|

}}{{#switch:single

|c|close  = 
|s|single
|o|open
|p|pair   = <br{{#if:| {{{params}}}}}

}}{{#switch:single

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:single

|s|single
|o|open   = 
|c|close
|p|pair   = </br>

}}{{#if:|

|

}} elements (or others, like nested blockquotes and lists):

Template:Tnull

which, while hard to read, especially for long content, results in the expected:

Template:Bq

And it Template:Em work with wikimarkup ":" indentation, unlike the failed test cases above:

Template:Bq

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:

Template:Bq

They Template:Em indentable:

Template:Bq
50px Template documentation[create]