-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/doc/comment: parse and print identifiers, automatic links
[This CL is part of a sequence implementing the proposal golang#51082. The design doc is at https://go.dev/s/godocfmt-design.] Implement parsing and printing of unmarked identifiers and automatic URL links in plain text. For golang#51082. Change-Id: Ib83ad482937501a6fc14fa788eab289533a68e3a Reviewed-on: https://go-review.googlesource.com/c/go/+/397280 Run-TryBot: Russ Cox <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
- Loading branch information
Showing
11 changed files
with
185 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,6 @@ Hello, world | |
|
||
This is a test. | ||
-- text -- | ||
Hello, | ||
world | ||
Hello, world | ||
|
||
This is | ||
a test. | ||
This is a test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- input -- | ||
The Go home page is https://go.dev/. | ||
It used to be https://golang.org. | ||
|
||
-- gofmt -- | ||
The Go home page is https://go.dev/. | ||
It used to be https://golang.org. | ||
|
||
-- text -- | ||
The Go home page is https://go.dev/. It used to be https://golang.org. | ||
|
||
-- markdown -- | ||
The Go home page is [https://go.dev/](https://go.dev/). It used to be [https://golang.org](https://golang.org). | ||
|
||
-- html -- | ||
<p>The Go home page is <a href="https://go.dev/">https://go.dev/</a>. | ||
It used to be <a href="https://golang.org">https://golang.org</a>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- input -- | ||
Hello, world. | ||
This is a paragraph. | ||
|
||
-- gofmt -- | ||
Hello, world. | ||
This is a paragraph. | ||
|
||
-- text -- | ||
Hello, world. This is a paragraph. | ||
|
||
-- markdown -- | ||
Hello, world. This is a paragraph. | ||
|
||
-- html -- | ||
<p>Hello, world. | ||
This is a paragraph. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{"TextWidth": -1} | ||
-- input -- | ||
Package gob manages streams of gobs - binary values exchanged between an | ||
Encoder (transmitter) and a Decoder (receiver). A typical use is | ||
transporting arguments and results of remote procedure calls (RPCs) such as | ||
those provided by package "net/rpc". | ||
|
||
The implementation compiles a custom codec for each data type in the stream | ||
and is most efficient when a single Encoder is used to transmit a stream of | ||
values, amortizing the cost of compilation. | ||
-- text -- | ||
Package gob manages streams of gobs - binary values exchanged between an Encoder (transmitter) and a Decoder (receiver). A typical use is transporting arguments and results of remote procedure calls (RPCs) such as those provided by package "net/rpc". | ||
|
||
The implementation compiles a custom codec for each data type in the stream and is most efficient when a single Encoder is used to transmit a stream of values, amortizing the cost of compilation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- input -- | ||
This is an italicword and a linkedword and Unicöde. | ||
-- gofmt -- | ||
This is an italicword and a linkedword and Unicöde. | ||
-- text -- | ||
This is an italicword and a linkedword and Unicöde. | ||
-- markdown -- | ||
This is an *italicword* and a [*linkedword*](https://example.com/linkedword) and Unicöde. | ||
-- html -- | ||
<p>This is an <i>italicword</i> and a <a href="https://example.com/linkedword"><i>linkedword</i></a> and Unicöde. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters