Template:Blockquote paragraphs: Difference between revisions

added {{code}}s and replaced nowikis with <syntaxhighlights>s
(add attribution (via JWB))
(added {{code}}s and replaced nowikis with <syntaxhighlights>s)
Line 1:
<div style="float: right; padding: 0 1em;">{{navbar|Blockquote paragraphs|plain=y}}</div>
The {{tagcode|blockquotelang=html|ocode=<blockquote>}} element and any templates that use it do not honor newlines:
{{markup
|<syntaxhighlight lang="html">
|<nowiki><blockquote>
Line 1
Line 2
Line 3
Line 4
</blockquote></nowiki>
</syntaxhighlight>
|<blockquote>
Line 1
Line 16 ⟶ 18:
}}
 
The simplest workaround for this is to use the {{xtag|poem}} tag inside {{tagcode|blockquotelang=html|ocode=<blockquote>}}, which will convert line breaks to {{tagcode|brlang=html|scode=<br />}} tags:
{{markup
|<syntaxhighlight lang="html">
|<nowiki><blockquote><poem>
Line 1
Line 2
Line 3
Line 4
</poem></blockquote></nowiki>
</syntaxhighlight>
|<blockquote><poem>
Line 1
Line 32 ⟶ 36:
}}<noinclude>
 
To markup actual paragraphs within block quotations, entire blank lines can be used between them, which will convert to {{tagcode|lang=html|code=<p>...</p>}} tags:
 
{{markup
|<syntaxhighlight lang="html">
|<nowiki><blockquote>
Paragraph 1
 
Line 41 ⟶ 46:
 
Paragraph 3
</blockquote></nowiki>
</syntaxhighlight>
|<blockquote>
Paragraph 1
Line 55 ⟶ 61:
<!-- Categories go on the /doc subpage. -->
 
{{En-WP attribution notice|Template:Blockquote paragraphs}}
</noinclude>
Anonymous user