Module talk:Lang-zh: Difference between revisions

Content deleted Content added
Line 164:
term = string.gsub(term, "^(.-[^\"'])[\"']?$", "%1")</syntaxhighlight> [[User:Freelance Intellectual|Freelance Intellectual]] ([[User talk:Freelance Intellectual|talk]]) 15:43, 24 September 2024 (UTC)
::::I think it's fine to strip all quote marks, in any quantity. That was the original intent of the code, and I don't see any complaints on this page. Adding bold to text is probably against [[WP:MOS]], and adding italics should be done with a parameter. People can use {{tag|b}} and {{tag|i}} tags if they insist on them. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 15:51, 24 September 2024 (UTC)
:::::Okay. I had taken your comment about fixing the Zhuzilin station article to mean that keeping the bold markup was intended, but I can see why it could be discouraged. I've also just found [[Template:Lang-zh/testcases]] (I had only looked under Module:Lang-zh before), and I don't see any testcases for stripping markup. So, if stripping markup is the desired functionality, the .- version above would work. I think it would make sense to document this, since there are three different kinds of thing being stripped: whitespace, markup, and quotes (double quotes aren't markup). It could be documented either on [[Template:Lang-zh/doc]] or directly as a code comment next to the line we're discussing, e.g. "remove trailing and leading spaces, quotes, and bold/italic markup". [[User:Freelance Intellectual|Freelance Intellectual]] ([[User talk:Freelance Intellectual|talk]]) 20:39, 24 September 2024 (UTC)