Fixing bad comment on StreamHandle type in IO domain

This commit is contained in:
Kenneth Shaw 2017-09-30 08:50:12 +07:00
parent 7f081d4be0
commit 73f5d37ce2
2 changed files with 8 additions and 1 deletions

View File

@ -3,7 +3,7 @@ package io
// Code generated by chromedp-gen. DO NOT EDIT.
// StreamHandle this is either obtained from another method or specified as
// blob:<uuid> where <uuid&gt is an UUID of a Blob.
// blob:<uuid> where <uuid> is an UUID of a Blob.
type StreamHandle string
// String returns the StreamHandle as string value.

View File

@ -25,10 +25,17 @@ var keep = map[string]bool{
"JavaScript": true,
}
var badHTMLReplacer = strings.NewReplacer(
"&lt;", "<",
"&gt;", ">",
"&gt", ">",
)
// formatComment formats a comment.
func formatComment(s, chop, newstr string) string {
s = strings.TrimPrefix(s, chop)
s = strings.TrimSpace(internal.CodeRE.ReplaceAllString(s, ""))
s = badHTMLReplacer.Replace(s)
l := len(s)
if newstr != "" && l > 0 {