Skip to content

fix: links with title not parsed / LinkButton.url not populated - #121

Open
ContextFound wants to merge 2 commits into
Infinitix-LLC:mainfrom
ContextFound:fix/link-bugs
Open

fix: links with title not parsed / LinkButton.url not populated#121
ContextFound wants to merge 2 commits into
Infinitix-LLC:mainfrom
ContextFound:fix/link-bugs

Conversation

@ContextFound

@ContextFound ContextFound commented Jan 13, 2026

Copy link
Copy Markdown

Markdown links with a well formed title do not render at all. click here displays as shown instead of creating a "click here" link. This fixes that by enhancing the regex that handles the link markdown. It also addresses an issue where widget.url is not populated effecting screen readers and debugging.

  • Update link regex to support optional title attribute: text
  • Update URL extraction logic to strip title portion from raw URL
  • Included 7771bbc to apply default link color (blue) when you don't include a style
  • Pass url parameter to LinkButton constructor in ATagMd.build()

Activates previously skipped tests that prove the fixes.

- Pass url parameter to LinkButton constructor in ATagMd.build()
- Update link regex to support optional title attribute: [text](url "title")
- Update URL extraction logic to strip title portion from raw URL

Includes test infrastructure and regression tests to prevent recurrence.
@ContextFound

Copy link
Copy Markdown
Author

fix: default link style - the style parameter for links used a ?.copyWith(), so if nothing was passed in, it didn't apply the default formatting color of blue. Changed it to apply the default if the style is null. Validated with included test, but also validated in-app using https://github.com/ContextFound/gpt_markdown_viewer

@ContextFound ContextFound changed the title Fix: links with title not parsed / LinkButton.url not populated fix: links with title not parsed / LinkButton.url not populated Jan 20, 2026
@saminsohag

Copy link
Copy Markdown
Collaborator

@ContextFound We find merge conflict to this pr in complex_markdown_test.dart. Please fix this conflict before we merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants