Commit b60c7a5c authored by Agniva De Sarker's avatar Agniva De Sarker Committed by Robert Griesemer

go/doc: document unicode quoting conversion

Fixes #30955

Change-Id: I8a2bff5215ddf6c3a80b1e760cb72b0bb9a5e0d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/206122Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent 72e043e4
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment