mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 12:47:22 +08:00
docgen: fix links with trailing dots (#3399)
This commit is contained in:
@ -551,7 +551,7 @@ Print contents of CPU registers.
|
||||
|
||||
regs [-a]
|
||||
|
||||
Argument -a shows more registers. Individual registers can also be displayed by 'print' and 'display'. See [Documentation/cli/expr.md.](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md.)
|
||||
Argument -a shows more registers. Individual registers can also be displayed by 'print' and 'display'. See [Documentation/cli/expr.md](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md).
|
||||
|
||||
|
||||
## restart
|
||||
|
||||
@ -27,6 +27,10 @@ func replaceDocPath(s string) string {
|
||||
break
|
||||
}
|
||||
}
|
||||
// If we captured a trailing dot, backtrack.
|
||||
if s[end-1] == '.' {
|
||||
end--
|
||||
}
|
||||
|
||||
text := s[start:end]
|
||||
s = s[:start] + fmt.Sprintf("[%s](//github.com/go-delve/delve/tree/master/%s)", text, text) + s[end:]
|
||||
|
||||
Reference in New Issue
Block a user