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 |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 29:
::{{re|Folly Mox|Toadspike}} I agree that this is confusing behaviour. It looks like the module currently only processes an unnamed argument at the end, on lines 287-309, in the case that it has not constructed any output. This section of code also duplicates some of the code earlier in the module, which is bad practice. As well as fixing the problem above, it would also be simpler and more maintainable to remove this section of code and instead map {{para|1}} to {{para|c}} at the beginning (e.g. just after line 103, where two other aliases are defined). [[User:Freelance Intellectual|Freelance Intellectual]] ([[User talk:Freelance Intellectual|talk]]) 15:37, 22 April 2025 (UTC)
== no-merging s and t ==
Line 116 ⟶ 112:
[[User:SirOlgen|SirOlgen]] ([[User talk:SirOlgen|talk]]) 16:28, 21 August 2025 (UTC)
: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)
|