mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
Apply a gentle highlight on nostr links
This commit is contained in:
2
utils.go
2
utils.go
@@ -233,7 +233,7 @@ func replaceURLsWithTags(line string) string {
|
||||
capturedGroup := submatch[2]
|
||||
first6 := capturedGroup[:6]
|
||||
last6 := capturedGroup[len(capturedGroup)-6:]
|
||||
replacement := fmt.Sprintf(`<a href="/%s">%s</a>`, capturedGroup, first6+"…"+last6)
|
||||
replacement := fmt.Sprintf(`<a href="/%s" class="nostr">%s</a>`, capturedGroup, first6+"…"+last6)
|
||||
return replacement
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user