Skip to content

Markdown formatting removes links #5576

Open
@hkparker

Description

@hkparker

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

Formatting seems to break links inside of markdown, they also appear to have an extra space in front

How to reproduce

Run the attached example code and notice the formatted code does not contain working links

Screenshots

Image

Example code

package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("demo")

	md := `
# Header

## Sub header with a [link](https://fyne.io)

Regular text with a [link](https://fyne.io) works

**Bold doesn't work with a [link](https://fyne.io)**

*Italic doesn't work with a [link](https://fyne.io)*
`

	w.SetContent(widget.NewRichTextFromMarkdown(md))

	w.ShowAndRun()
}

Fyne version

2.5.4

Go compiler version

go1.23.6 linux/amd64

Operating system and version

Arch Linux

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions