]> Cypherpunks repositories - gostls13.git/commit
go/doc: skip escaping comments in pre-formatted blocks
authorAgniva De Sarker <agnivade@yahoo.co.in>
Mon, 18 Feb 2019 09:13:06 +0000 (14:43 +0530)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 26 Feb 2019 18:51:37 +0000 (18:51 +0000)
commitda50e10c2e80e8c4f53a0bb1d20de57995abc7ca
treefc7ccc947cf5d5867092e40f74d5337247214405
parent39fa3f171c7b790a3f8f22d8398fdf67d680b5a7
go/doc: skip escaping comments in pre-formatted blocks

CL 150377 made the change of converting smart quotes to their html escaped entities
for ToHTML, and to unicode quotes for ToText. But for ToText, the change
converted the quotes in pre-formatted text too.

This fixes that behavior to not touch any text in pre-formatted blocks, which also
makes the behavior consistent with ToHTML.

Fixes #29730

Change-Id: I58e0216cbdbe189d06d82147e5a02b620af14734
Reviewed-on: https://go-review.googlesource.com/c/162922
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/doc/comment.go
src/go/doc/comment_test.go