diff --git a/godoc/static/gen.go b/godoc/static/gen.go index 5ffa6d0c..b622e783 100644 --- a/godoc/static/gen.go +++ b/godoc/static/gen.go @@ -88,7 +88,15 @@ func Generate() ([]byte, error) { fmt.Fprintf(buf, ",\n\n") } fmt.Fprintln(buf, "}") - return format.Source(buf.Bytes()) + + b := buf.Bytes() + + // The ιΏ₯ U+9FE5 character became printable in go 1.10, + // causing it to appear literally in newer output. + // Force the old behavior. + b = bytes.Replace(b, []byte("\u9fe5"), []byte(`\u9fe5`), -1) + + return format.Source(b) } // sanitize prepares a valid UTF-8 string as a raw string constant. diff --git a/godoc/static/gen_test.go b/godoc/static/gen_test.go index 95e9bfc5..477a714e 100644 --- a/godoc/static/gen_test.go +++ b/godoc/static/gen_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//+build go1.10 - package static import (