"Plain" link regression
Describe the bug From #19 it seems like links that are "plain" (reference themselves) was fixed to only print the url once. This no longer seems to be the case and doubly prints plain links.
ie: https://www.example.com => https://www.example.com https://www.example.com
This issue is not present in Glamour v0.7.0 but is in Glamour v0.8.0
Setup
- OS: macOS 14.6.1 (23G93)
- Shell: zsh 5.9 (x86_64-apple-darwin23.0)
- Terminal Emulator: Warp, Intellij
- Terminal Multiplexer: None
- Glamour: v0.8.0
To Reproduce Steps to reproduce the behavior:
-
go get github.com/charmbracelet/[email protected] - Use below snippet as
main.go -
go run main.go
Source Code
package main
import (
"fmt"
"github.com/charmbracelet/glamour"
)
func main() {
md, err := glamour.Render("https://www.example.com", "dark")
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Println(md)
}
https://play.golang.com/p/3mfQERFnZ3e (Note: Usually doesn't work due to timeouts importing Glamour)
Expected behavior
From the above example I expect that https://www.example.com is written exactly once.
Screenshots
Additional context #19 references commit 9b192ba but I'm presently having a difficult time finding that commit, I'm still looking.
Looks like the change in behavior was introduced in https://github.com/charmbracelet/glamour/commit/5f5965ed1282e3d4299ca9eac221771fc2488159#diff-ea3fd9921125a5b147d806d777214ac9493e6aaeead982dce3e518cf83df1308
This will be fixed by #415.