mirror of https://github.com/golang/go.git
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 <gri@golang.org>
This commit is contained in:
parent
72e043e48b
commit
b60c7a5c7f
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue