Content deleted Content added
→L switch throwing Linter errors when value ends with a closing italics tag: Thanks to User:Freelance Intellectual for the workaround |
|||
Line 115:
:So to put it in non-Lint terms, it doesn't appear as though this template's "literal" parameter is properly handling italics tags which occur either first or last in the passed string. [[User:SirOlgen|SirOlgen]] ([[User talk:SirOlgen|talk]]) 18:09, 21 August 2025 (UTC)
::Yes, see this previous discussion: [[Module_talk:Lang-zh/Archive_5#Trailing_bold_in_l=_not_being_removed]]. A workaround is to use HTML italic tags, e.g. <code><nowiki>{{zh|l=reformed <i>mangtong</i>}}</nowiki></code> for {{zh|l=reformed <i>mangtong</i>}}. The stripping of bold and italic markup is commented in the code but not mentioned in the template documentation. At the time of the previous discussion, I wasn't convinced that stripping quotation marks was necessary, but I also didn't know of any use cases where it would cause a problem and so I didn't push the point further. However, this looks like a valid use case, and I think we should revisit the question of why quotes should be stripped. In contrast, this doesn't happen for {{tl|lit}}, which otherwise has extremely similar functionality to the {{para|l}} parameter. [[User:Freelance Intellectual|Freelance Intellectual]] ([[User talk:Freelance Intellectual|talk]]) 21:57, 22 August 2025 (UTC)
:::Thanks a million for the background info and workaround (I'm embarrassed for not having thought to try that, LOL). This does seem like a pretty obscure use case, but it also seems a near certainty there will be more examples out there among the 1.9M outstanding "[[Special:LintErrors/missing-end-tag|missing end tag]]" errors.
:::Thanks again!
:::[[User:SirOlgen|SirOlgen]] ([[User talk:SirOlgen|talk]]) 02:11, 24 August 2025 (UTC)
|