Skip to content

Commit 6ea9aab

Browse files
Higher-tech 404 page
1 parent 1e2c787 commit 6ea9aab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

message-index/404.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
<div id="documentation-pointer">Page not found.</div>
66

77
<script>
8-
const messageRe = /^\/messages\/[A-Z]+-[0-9]+/;
8+
const messageRe = /^\/messages\/([A-Z]+-[0-9]+)/;
99
if (messageRe.test(window.location.pathname)) {
10-
document.getElementById("documentation-pointer").innerHTML = "This message is currently undocumented. You can help out by <a href=\"https://github.com/haskellfoundation/error-message-index/issues\">opening an issue</a> or <a href=\"https://github.com/haskellfoundation/error-message-index/pulls\">contributing documentation</a>."
10+
const messageNum = window.location.pathname.match(messageRe)[1];
11+
document.getElementById("documentation-pointer").innerHTML = "Message <code>" + messageNum + "</code> is currently undocumented. You can help out by <a href=\"https://github.com/haskellfoundation/error-message-index/issues?q=is%3Aissue+is%3Aopen+" + messageNum + "\">opening or commenting on an issue</a> or <a href=\"https://github.com/haskellfoundation/error-message-index/blob/main/CONTRIBUTING.md\">contributing documentation</a>."
1112
}
1213
</script>

0 commit comments

Comments
 (0)