Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit 1cb0cdb

Browse files
committed
Merge pull request #208 from birkenfeld/error-fix
Fix error code links for legacy messages.
2 parents 9e4ba10 + a83f106 commit 1cb0cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static/web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@
586586

587587
function formatCompilerOutput(text) {
588588
return ansi2html(text).replace(/\[(--explain )?(E\d\d\d\d)\]/g, function(text, prefix, code) {
589-
return "[<a href=https://doc.rust-lang.org/error-index.html#" + code + ">" + prefix + code + "</a>]";
589+
return "[<a href=https://doc.rust-lang.org/error-index.html#" + code + ">" + (prefix ? prefix : "") + code + "</a>]";
590590
}).replace(/run `rustc --explain (E\d\d\d\d)` to see a detailed explanation/g, function(text, code) {
591591
return "see the <a href=https://doc.rust-lang.org/error-index.html#" + code + ">detailed explanation for " + code + "</a>";
592592
}).replace(/&lt;anon&gt;:(\d+)$/mg, jumpToLine) // panicked at 'foo', $&

0 commit comments

Comments
 (0)