Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
5a03cd56
Commit
5a03cd56
authored
Oct 01, 2012
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/godoc: clearer comments in FormatSelections
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/6561073
parent
3f7fb918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/cmd/godoc/format.go
src/cmd/godoc/format.go
+3
-1
No files found.
src/cmd/godoc/format.go
View file @
5a03cd56
...
...
@@ -54,6 +54,8 @@ type SegmentWriter func(w io.Writer, text []byte, selections int)
// Selection is ignored.
//
func
FormatSelections
(
w
io
.
Writer
,
text
[]
byte
,
lw
LinkWriter
,
links
Selection
,
sw
SegmentWriter
,
selections
...
Selection
)
{
// If we have a link writer, make the links
// selection the last entry in selections
if
lw
!=
nil
{
selections
=
append
(
selections
,
links
)
}
...
...
@@ -109,7 +111,7 @@ func FormatSelections(w io.Writer, text []byte, lw LinkWriter, links Selection,
}
// determine the kind of segment change
if
lw
!=
nil
&&
index
==
len
(
selections
)
-
1
{
// we have a link segment change:
// we have a link segment change
(see start of this function)
:
// format the previous selection segment, write the
// link tag and start a new selection segment
segment
(
offs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment