diff --git a/internal/godocfx/parse.go b/internal/godocfx/parse.go
index 067208c91b8d..56bdede75aba 100644
--- a/internal/godocfx/parse.go
+++ b/internal/godocfx/parse.go
@@ -625,7 +625,11 @@ func toHTML(s string) string {
panic(err)
}
- return mdBuf.String()
+ // Replace * with * to avoid confusing the DocFX Markdown processor,
+ // which sometimes interprets * as .
+ result := string(bytes.ReplaceAll(mdBuf.Bytes(), []byte("*"), []byte("*")))
+
+ return result
}
func hasPrefix(s string, prefixes []string) bool {
diff --git a/internal/godocfx/testdata/golden/index.yml b/internal/godocfx/testdata/golden/index.yml
index b5cc89b13339..47c9a91fe83b 100644
--- a/internal/godocfx/testdata/golden/index.yml
+++ b/internal/godocfx/testdata/golden/index.yml
@@ -91,7 +91,7 @@ items:
client are often of the type googleapi.Error
.\nThese
errors can be introspected for more information by type asserting to the richer
googleapi.Error
type. For example:
if
- e, ok := err.(*googleapi.Error); ok {\n\t if e.Code == 409 { ... }\n}\n
"
+ e, ok := err.(*googleapi.Error); ok {\n\t if e.Code == 409 { ... }\n}\n"
type: package
langs:
- go