573
edits
(phpBB smilies support) |
(kind of fixed a too greedy regex. see FlightGear wiki talk:Instant-Cquotes#too greedy non-greedy regexes) |
||
Line 160: | Line 160: | ||
// first tries internal links, firstmost links to images (File:xxx), because | // first tries internal links, firstmost links to images (File:xxx), because | ||
// they need special treatment, or they get displayed | // they need special treatment, or they get displayed | ||
html = html.replace(/<a | html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(File:.*?)".*?>(.*?)<\/a>/g, "[[:$1|$2]]"); | ||
html = html.replace(/<a | html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(.*?)".*?>(.*?)<\/a>/g, "[[$1|$2]]"); | ||
// then the others | // then the others | ||
html = html.replace(/<a[^(?:href)]*href="(.*?)".*?>(.*?)<\/a>/g, "[$1 $2]"); | |||
return html; | |||
}; | }; | ||
} | } |
edits