Content deleted Content added
Lightmouse (talk | contribs) No edit summary |
Lightmouse (talk | contribs) No edit summary |
||
Line 77:
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-|)\[\[(metre|meter)\]\]s([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1$2 $3s$4');
//space before 'm' only when lower case. Check for dollars and pounds to avoid 'm' used for millions in money.
txt.value=txt.value.replace(/(
//convert 'metres' to 'm' when in parentheses
txt.value=txt.value.replace(/(
txt.value=txt.value.replace(/(\(\d[\d,\.]{0,16}) (?:metres|meters|metre|meter)(\))/g, '$1 m$2');
txt.value=txt.value.replace(/({convert\|\d{1,16}\|(?:m|ft)[^\}]{0,16})\|lk=(?:on|in|out)/g, '$1');
Line 90:
//square metre
txt.value=txt.value.replace(/(\d)(?:\s|-| |)sq(?:\s|\.\s|-| )m([:;,\.?!]?\s[^\d\(\)\/\\])/gi, '$1 m²$2');
txt.value=txt.value.replace(/({convert\|\d{1,16}\|(?:sqm|sqft)[^\}]{0,16})\|lk=(?:on|in|out)/g, '$1');
Line 158 ⟶ 156:
//foot
//convert 'foot' to 'ft' when in parentheses
txt.value=txt.value.replace(/(
txt.value=txt.value.replace(/(\(\d[\d,\.]{0,16}) (?:feet|foot)(\))/g, '$1 ft$2');
//remove trailing period when in parentheses
txt.value=txt.value.replace(/(
txt.value=txt.value.replace(/(\(\d[\d,\.]{0,16}) ft\.(\))/g, '$1 ft$2');
|