Use standard /regexp/ syntax
commitdca72d2af77d2b268b5c6a05852dfad204b2c3a1
authorLiam Cooke <noreply@liamcooke.com>
dateMon 12 Aug 2019, 22:28 (7 years ago)
parent12ac412
scripts/wiki.js+1−1
@@ -56,7 +56,7 @@ const Wiki = sites => {
5656 }
5757
5858 const formatLinks = text => text.replace(
59− new RegExp('\\b((https?|dat)://[^"\\s]+)', 'g'),
59+ /\b((https?|dat):\/\/[^"\s]+)/g,
6060 '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>'
6161 )
6262