Template:Blockquote/doc: Difference between revisions

Attempt to restore documentation to pre "trim quotes" and "notrim" state. Corrections welcome.
(mark as High-risk)
(Attempt to restore documentation to pre "trim quotes" and "notrim" state. Corrections welcome.)
Line 84:
| source =
| character =
| multiline =
| style =
| notrim =
}}
</pre>
Line 132:
The {{code|lang=html|code=<blockquote>...</blockquote>}} element has styles that change the font size: on desktop, text is smaller; on mobile, it is larger. This change is relative to the enclosing context, meaning that if you quote from a source that itself uses a block quotation, you'll find that the inner quotation is either really tiny and hard to read, or really large and barely fits on the screen. To fix this issue, add the parameter {{para|style|{{code|lang=css|font-size:inherit;}}}} on any inner {{tl|Quote}} templates.
 
=== Technical issues with block templates ===
When a block quotation begins and ends with interior quotations using quotation marks, the code in the template that performs (usually desirable) detection and pruning of leading/trailing quotation marks will unintentionally mess up the formatting of these interior quotes. In such a case, use the {{para|notrim|y}} (or {{para|notrim|true}}, etc.) parameter:
{{Block bug documentation}}
 
{{tnull|Quote&nbsp;|text{{=}}"The Jewish people are fans of Pope John Paul II", said Greg Packer of Huntington, N.J. "He does not limit his message to one faith; he reaches out to everybody."&nbsp;|notrim{{=}}yes}}
 
=== Mis-detection of wikimarkup ===
The template uses {{tlx|trim quotes}} to remove quotation marks from around quotations when put into block format (per [[MOS:BQ]]). However, if the quoted material happens to both begin and end with italics in {{kbd|<nowiki>''</nowiki>}} format or boldface in {{kbd|<nowiki>'''</nowiki>}} format, these will be partially mis-detected as regular quotation marks, which will result in unintended output. There are several workarounds for this problem (any one will suffice):
* Insert <code>&lt;nowiki /&gt;</code> at the beginning of the quoted material, before any {{kbd|<nowiki>''</nowiki>}} or {{kbd|<nowiki>'''</nowiki>}} markup
* Change the {{kbd|<nowiki>''</nowiki>}} markup to explicit HTML {{tag|i}}, and {{kbd|<nowiki>'''</nowiki>}} to {{tag|b}}
* Add the parameter {{para|notrim|y}} (or any other value, e.g. {{para|notrim|yes}}, {{para|notrim|1}}).
Use of any of these will have the effect of suppressing quotation-marks trimming entirely. A more robust solution at [[Template talk:Trim quotes]] is being sought so that these work-arounds are not necessary.
 
== Errors ==
Anonymous user