FlightGear wiki:Instant-Refs: Difference between revisions

(phpBB smilies support)
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.*?href="https?:\/\/wiki.flightgear.org\/(File:.*?)".*?>(.*?)<\/a>/g, "[[:$1|$2]]");
         html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(File:.*?)".*?>(.*?)<\/a>/g, "[[:$1|$2]]");
         html = html.replace(/<a.*?href="https?:\/\/wiki.flightgear.org\/(.*?)".*?>(.*?)<\/a>/g, "[[$1|$2]]");
         html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(.*?)".*?>(.*?)<\/a>/g, "[[$1|$2]]");
       
         // then the others
         // then the others
         return html.replace(/<a.*?href="(.*?)".*?>(.*?)<\/a>/g, "[$1 $2]");
         html = html.replace(/<a[^(?:href)]*href="(.*?)".*?>(.*?)<\/a>/g, "[$1 $2]");
        return html;
     };
     };
}
}
573

edits