From b60c7a5c7f50fc75ddecb7f1dea6c2e47a12b42c Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Sun, 10 Nov 2019 11:56:15 +0530 Subject: [PATCH] go/doc: document unicode quoting conversion Fixes #30955 Change-Id: I8a2bff5215ddf6c3a80b1e760cb72b0bb9a5e0d3 Reviewed-on: https://go-review.googlesource.com/c/go/+/206122 Reviewed-by: Robert Griesemer --- src/go/doc/comment.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/go/doc/comment.go b/src/go/doc/comment.go index 88be45bb8f..da33f21612 100644 --- a/src/go/doc/comment.go +++ b/src/go/doc/comment.go @@ -300,6 +300,9 @@ func anchorID(line string) string { // in the words map, the link is taken from the map (if the corresponding map // value is the empty string, the URL is not converted into a link). // +// A pair of (consecutive) backticks (`) is converted to a unicode left quote (“), and a pair of (consecutive) +// single quotes (') is converted to a unicode right quote (”). +// // Go identifiers that appear in the words map are italicized; if the corresponding // map value is not the empty string, it is considered a URL and the word is converted // into a link. @@ -417,6 +420,9 @@ func blocks(text string) []block { // It wraps paragraphs of text to width or fewer Unicode code points // and then prefixes each line with the indent. In preformatted sections // (such as program text), it prefixes each non-blank line with preIndent. +// +// A pair of (consecutive) backticks (`) is converted to a unicode left quote (“), and a pair of (consecutive) +// single quotes (') is converted to a unicode right quote (”). func ToText(w io.Writer, text string, indent, preIndent string, width int) { l := lineWrapper{ out: w, -- 2.48.1