Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown image with no title is not parsed #3577

Closed
2 tasks done
andydotxyz opened this issue Jan 17, 2023 · 1 comment
Closed
2 tasks done

Markdown image with no title is not parsed #3577

andydotxyz opened this issue Jan 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@andydotxyz
Copy link
Member

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

If the title field is blank in my markdown the image is not added.

How to reproduce

Run test TestRichTextMarkdown_Image with "title" removed from the input string.

Screenshots

No response

Example code

	r := NewRichTextFromMarkdown("![](../../theme/icons/fyne.png)")

	assert.Equal(t, 1, len(r.Segments))
	if img, ok := r.Segments[0].(*ImageSegment); ok {
		assert.Equal(t, storage.NewFileURI("../../theme/icons/fyne.png"), img.Source)
	} else {
		t.Error("Segment should be a Image")
	}

Fyne version

v2.3.0

Go compiler version

1.18.4

Operating system

macOS

Operating system version

Monterey

Additional Information

No response

@andydotxyz andydotxyz added unverified A bug that has been reported but not verified bug Something isn't working and removed unverified A bug that has been reported but not verified labels Jan 17, 2023
@andydotxyz andydotxyz added this to the Fixes (v2.3.x) milestone Jan 17, 2023
andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jan 21, 2023
@andydotxyz
Copy link
Member Author

Fixed on develop

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant