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
10ae88f4
Commit
10ae88f4
authored
Aug 12, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
partial correction for CL 1983043: fix various godoc-related regexp calls
R=rsc CC=golang-dev
https://golang.org/cl/1987041
parent
079a1174
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
src/cmd/godoc/godoc.go
src/cmd/godoc/godoc.go
+3
-3
src/pkg/go/doc/comment.go
src/pkg/go/doc/comment.go
+1
-1
src/pkg/go/doc/doc.go
src/pkg/go/doc/doc.go
+1
-1
No files found.
src/cmd/godoc/godoc.go
View file @
10ae88f4
...
...
@@ -943,9 +943,9 @@ var (
func
extractString
(
src
[]
byte
,
rx
*
regexp
.
Regexp
)
(
s
string
)
{
m
:=
rx
.
Find
(
src
)
if
len
(
m
)
>=
4
{
s
=
strings
.
TrimSpace
(
string
(
src
[
m
[
2
]
:
m
[
3
]
]))
m
:=
rx
.
Find
Submatch
(
src
)
if
m
!=
nil
{
s
=
strings
.
TrimSpace
(
string
(
m
[
1
]))
}
return
}
...
...
src/pkg/go/doc/comment.go
View file @
10ae88f4
...
...
@@ -199,7 +199,7 @@ var (
// and '' into ”).
func
emphasize
(
w
io
.
Writer
,
line
[]
byte
,
words
map
[
string
]
string
,
nice
bool
)
{
for
{
m
:=
matchRx
.
Find
(
line
)
m
:=
matchRx
.
Find
SubmatchIndex
(
line
)
if
m
==
nil
{
break
}
...
...
src/pkg/go/doc/doc.go
View file @
10ae88f4
...
...
@@ -309,7 +309,7 @@ func (doc *docReader) addFile(src *ast.File) {
// collect BUG(...) comments
for
_
,
c
:=
range
src
.
Comments
{
text
:=
c
.
List
[
0
]
.
Text
if
m
:=
bug_markers
.
Find
(
text
);
m
!=
nil
{
if
m
:=
bug_markers
.
Find
Index
(
text
);
m
!=
nil
{
// found a BUG comment; maybe empty
if
btxt
:=
text
[
m
[
1
]
:
];
bug_content
.
Match
(
btxt
)
{
// non-empty BUG comment; collect comment without BUG prefix
...
...
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