Module talk:Lang-zh: Difference between revisions

Content deleted Content added
Line 153:
 
:{{ping|Jonesey95}} This is because the * operator is greedy, so .* matches everything else in the string. Changing .* to .*? would make it lazy, so that the final term catches all trailing characters. In other words, change the line of code to: <syntaxhighlight>term = string.gsub(term, "^([ \"']*)(.*?)([ \"']*)$", "%2")</syntaxhighlight> [[User:Freelance Intellectual|Freelance Intellectual]] ([[User talk:Freelance Intellectual|talk]]) 13:51, 16 September 2024 (UTC)
::Thanks! That fixed the problem at [[Zhuzilin station]] and probably other pages. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:26, 16 September 2024 (UTC)