warn.py: have URLs open in new tabs
Bug: None
Test: Ran warn.py on a build log. Code links in resultant HTML open in
new tabs when clicked.
Change-Id: Ia3def5ea14fe216700cb2ffabe4a39b98e69d55a
diff --git a/tools/warn.py b/tools/warn.py
index e786e3c..9cb115e 100755
--- a/tools/warn.py
+++ b/tools/warn.py
@@ -2463,10 +2463,11 @@
if (FlagURL == "") return line;
if (FlagSeparator == "") {
return line.replace(ParseLinePattern,
- "<a href='" + FlagURL + "/$1'>$1</a>:$2:$3");
+ "<a target='_blank' href='" + FlagURL + "/$1'>$1</a>:$2:$3");
}
return line.replace(ParseLinePattern,
- "<a href='" + FlagURL + "/$1" + FlagSeparator + "$2'>$1:$2</a>:$3");
+ "<a target='_blank' href='" + FlagURL + "/$1" + FlagSeparator +
+ "$2'>$1:$2</a>:$3");
}
function createArrayOfDictionaries(n) {
var result = [];