Skip to content

Support in-page anchor links (#fragment) for Markdown headings #40

@liyofx

Description

@liyofx

Currently, flutter_markdown / flutter_markdown_plus correctly parses Markdown links like:

[Developer Tools](#developer-tools)

However, when such links are tapped, the framework treats them as external URLs and attempts to launch them via platform intents, which results in errors such as:

PlatformException(ACTIVITY_NOT_FOUND, No Activity found to handle intent { #developer-tools })

There is currently no built-in support for in-page anchor navigation, i.e. scrolling to a heading within the same Markdown document.

Expected Behavior

Links that start with # should be treated as internal anchor links

Tapping an anchor link should scroll to the corresponding heading in the same Markdown view

Headings (#, ##, ###, etc.) should be able to expose a stable anchor ID (similar to GitHub-style slug generation)

Example:

## Developer Tools
...
[Go to Developer Tools](#developer-tools)

Tapping the link should scroll to the ## Developer Tools section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions