Content deleted Content added
Lightmouse (talk | contribs) No edit summary |
Lightmouse (talk | contribs) No edit summary |
||
Line 249:
//delink this common unit
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-|)\[\[(kilometres|kilometers|kilometre|kilometer)\]\]([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1$2 $3$4');
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-|)\[\[(kilometre|kilometer)\]\]s([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1$2 $3s$4');▼
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16}) \[\[(kilometres|kilometers|kilometre|kilometer)\]\]([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1$2 $3$4');
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16}) \[\[(?:kilometres?|kilometers?)\|(km)\]\]([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1$2 $3$4');
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-|)kms?([:;,\.?!]?\s[^\d\(\)\/\\])/gi, '$1$2 km$3');
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16}) kms?([:;,\.?!]?\s[^\d\(\)\/\\])/gi, '$1$2 km$3');
Line 432:
//knot - abbreviation
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-| |)(?:kts?|\[\[knot\s\(speed\)\|kts?\]\])([:;,\.?!]?\s[^\d\(\)\/\\])/gi, '$1{{convert|$2|knot|km/h|abbr=on}}$3');
//mile - delink this common unit
▲txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16})(?:\s|-|)\[\[(
txt.value=txt.value.replace(/([^\d\(\)\/\\]\s)(\d[\d,\.]{0,16}) \[\[(miles?)\]\]([:;,\.?!]?\s[^\d\(\)\/\\])/g, '$1$2 $3$4');
//mile - lower case to avoid proper names like 'Five Mile Road'
|