mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-11-05 01:53:00 +00:00
Handle anchored links correctly
This commit is contained in:
@@ -97,6 +97,11 @@ func From(address, display, hyphaName string) *Link {
|
|||||||
link.Display = strings.TrimSpace(display)
|
link.Display = strings.TrimSpace(display)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pos := strings.IndexRune(address, '#'); pos != -1 {
|
||||||
|
link.Anchor = address[pos:]
|
||||||
|
address = address[:pos]
|
||||||
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case strings.ContainsRune(address, ':'):
|
case strings.ContainsRune(address, ':'):
|
||||||
pos := strings.IndexRune(address, ':')
|
pos := strings.IndexRune(address, ':')
|
||||||
|
|||||||
Submodule metarrhiza updated: e7040f3e0d...133b2689fb
Reference in New Issue
Block a user