Module:Citation/CS1/COinS: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
சி en:Module:Citation/CS1/COinS இலிருந்து ஒரு திருத்தம் |
Synch from sandbox; |
||
வரிசை 1:
local coins = {};
வரி 129 ⟶ 130:
local function coins_replace_math_stripmarker (value)
local stripmarker = cfg.stripmarkers['
local rendering = value:match (stripmarker); -- is there a math stripmarker
வரி 156 ⟶ 157:
Cleanup parameter values for the metadata by removing or replacing invisible characters and certain html entities.
2015-12-10: there is a bug in mw.text.unstripNoWiki (). It
when it shouldn't. See https://phabricator.wikimedia.org/T121085 and Wikipedia_talk:Lua#stripmarkers_and_mw.text.unstripNoWiki.28.29
வரி 166 ⟶ 167:
local function coins_cleanup (value)
local replaced = true; -- default state to get the do loop running
while replaced do -- loop until all math stripmarkers replaced
replaced, value = coins_replace_math_stripmarker (value); -- replace math stripmarker with text representation of the equation
end
value = value:gsub (cfg.stripmarkers['
value = mw.text.unstripNoWiki (value); -- replace nowiki stripmarkers with their content
value = value:gsub ('<span class="nowrap" style="padding%-left:0%.1em;">'(s?)</span>', "'
value = value:gsub (' ', ' '); -- replace entity with plain space
value = value:gsub ('\226\128\138', ' '); -- replace hair space with plain space
value = value:gsub ('‍', ''); -- remove ‍ entities
value = value:gsub ('[\226\128\141\226\128\139\194\173]', '')
value = value:gsub ('[
return value;
end
| |||