Skip to content

Commit

Permalink
Replays: don't add hash to <a> tags
Browse files Browse the repository at this point in the history
  • Loading branch information
monsanto committed Oct 7, 2023
1 parent d8f4063 commit fe81e13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion replays/build
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function updateIndex() {

// add hashes to js and css files
process.stdout.write("Updating hashes... ");
indexContents = indexContents.replace(/(src|href)="\/(.*?)(\?[a-z0-9]*?)?"/g, runReplace);
// Check for <script, <link or <img so we don't add useless hashes to <a
indexContents = indexContents.replace(/(<script[^>]+?src|<link[^>]+?href|<img[^>]+?src)="\/(.*?)(\?[a-z0-9]*?)?"/g, runReplace);
console.log("DONE");

process.stdout.write("Writing new `wrapper.inc.php` file... ");
Expand Down

0 comments on commit fe81e13

Please sign in to comment.