]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: make block kinds clickable in html
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 27 Aug 2015 17:29:01 +0000 (10:29 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 27 Aug 2015 17:30:50 +0000 (17:30 +0000)
Change-Id: I113c07caf504cee66a81730da8830de6de098e49
Reviewed-on: https://go-review.googlesource.com/13981
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/ssa/html.go

index 5c23320680106d46a383b8c5b2ec515996b3e1f3..44e4e19b777f02bf66768796c7bdee4a52ebfe14 100644 (file)
@@ -379,7 +379,7 @@ func (b *Block) HTML() string {
 
 func (b *Block) LongHTML() string {
        // TODO: improve this for HTML?
-       s := b.Kind.String()
+       s := fmt.Sprintf("<span class=\"%s ssa-block\">%s</span>", html.EscapeString(b.String()), html.EscapeString(b.Kind.String()))
        if b.Control != nil {
                s += fmt.Sprintf(" %s", b.Control.HTML())
        }