mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-09-02 02:48:05 +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)
|
||||
}
|
||||
|
||||
if pos := strings.IndexRune(address, '#'); pos != -1 {
|
||||
link.Anchor = address[pos:]
|
||||
address = address[:pos]
|
||||
}
|
||||
|
||||
switch {
|
||||
case strings.ContainsRune(address, ':'):
|
||||
pos := strings.IndexRune(address, ':')
|
||||
|
Submodule metarrhiza updated: e7040f3e0d...133b2689fb
Reference in New Issue
Block a user