Content deleted Content added
Lightmouse (talk | contribs) No edit summary |
Lightmouse (talk | contribs) No edit summary |
||
Line 225:
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(/(\(\d[\d,\.]{0,16})(?:\s|-|)m([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1
//convert 'metres' to 'm' when in parentheses
txt.value=txt.value.replace(/(\(\d[\d,\.]{0,16})(?:\s|-|)(?:metres|meters|metre|meter)(\))/g, '$1 m$2');
|