]> Cypherpunks repositories - gostls13.git/commit
go/doc: convert to unicode quotes for ToText and Synopsis
authorAgniva De Sarker <agnivade@yahoo.co.in>
Tue, 20 Nov 2018 05:43:03 +0000 (11:13 +0530)
committerRobert Griesemer <gri@golang.org>
Thu, 29 Nov 2018 19:06:32 +0000 (19:06 +0000)
commit81a5c9c306a35a297c86d72c9729a16f69acec21
tree1119aa9a222e76631e11759dc28bbecbd752d688
parent689fae2d7861fe14032762479011f9e48562e1e0
go/doc: convert to unicode quotes for ToText and Synopsis

We refactor the conversion of quotes to their unicode equivalent
to a separate function so that it can be called from ToText and Synopsis.

And we introduce a temp buffer to write the escaped HTML and convert
the unicode quotes back to html escaped entities. This simplifies the logic
and gets rid of the need to track the index of the escaped text.

Fixes #27759

Change-Id: I71cf47ddcd4c6794ccdf2898ac25539388b393c1
Reviewed-on: https://go-review.googlesource.com/c/150377
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/doc/comment.go
src/go/doc/comment_test.go
src/go/doc/synopsis.go
src/go/doc/synopsis_test.go