Skip to content

Commit 4ee564c

Browse files
committed
1 parent ea66b00 commit 4ee564c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/hexdocs/file_rewriter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Hexdocs.FileRewriter do
55
@link_hooks [@link_hook1, @link_hook2]
66

77
@analytics_hook ~s|</head>|
8-
@analytics_addition ~s|<script async defer data-domain="${DOMAIN}" src="https://stats.${DOMAIN}/js/index.js" onerror="console.warn('failed to load:', this.src)"></script>|
8+
@analytics_addition ~s|<script async defer data-domain="${DOMAIN}" src="https://stats.${DOMAIN}/js/script.js" onerror="console.warn('failed to load:', this.src)"></script>|
99

1010
@noindex_hook ~s|<meta name="robots" content="noindex">|
1111

test/hexdocs/file_rewriter_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ defmodule Hexdocs.FileRewriterTest do
55
test "run/1" do
66
assert FileRewriter.run("index.html", "") == ""
77

8-
assert FileRewriter.run("index.html", "</head>") ==
9-
~s|<script async defer data-domain="localhost" src="https://stats.localhost/js/index.js"></script></head>|
8+
assert FileRewriter.run("index.html", "</head>") =~
9+
~s|<script async defer data-domain="localhost" src="https://stats.localhost/js/script.js"|
1010

1111
assert FileRewriter.run(
1212
"index.html",

0 commit comments

Comments
 (0)