commit 537e0cfe96dacd0d96ea61cd6e21729ad3dc3dca
parent 06ac09ca1b0333f52b3a0d363ecec09797161d30
Author: Russ Cox <rsc@golang.org>
Date: Fri, 15 May 2015 10:24:29 -0400
godash: make links open in new window
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/godash/main.go b/godash/main.go
@@ -145,9 +145,9 @@ func printHTML() {
fmt.Printf(".late {color: #700; text-decoration: underline;}\n")
fmt.Printf("</style>\n")
fmt.Printf("<pre>\n")
- data = regexp.MustCompile(`(?m)^HOWTO`).ReplaceAllString(data, `<a href="index.html">about the dashboard</a>`)
- data = regexp.MustCompile(`(CL (\d+))\b`).ReplaceAllString(data, "<a href='https://golang.org/cl/$2'>$1</a>")
- data = regexp.MustCompile(`(#(\d\d\d+))\b`).ReplaceAllString(data, "<a href='https://golang.org/issue/$2'>$1</a>")
+ data = regexp.MustCompile(`(?m)^HOWTO`).ReplaceAllString(data, `<a target="_blank" href="index.html">about the dashboard</a>`)
+ data = regexp.MustCompile(`(CL (\d+))\b`).ReplaceAllString(data, "<a target="_blank" href='https://golang.org/cl/$2'>$1</a>")
+ data = regexp.MustCompile(`(#(\d\d\d+))\b`).ReplaceAllString(data, "<a target="_blank" href='https://golang.org/issue/$2'>$1</a>")
data = regexp.MustCompile(`(?m)^([\?A-Za-z0-9][^\n]*)`).ReplaceAllString(data, "<b>$1</b>")
data = regexp.MustCompile(`(?m)^([^\n]*\[maybe[^\n]*)`).ReplaceAllString(data, "<span class='maybe'>$1</span>")
data = regexp.MustCompile(`(?m)^( +)(.*)( → )(.*)(, [\d/]+ days)(, waiting for reviewer)`).ReplaceAllString(data, "$1$2$3<b>$4</b>$5$6")