Skip to content

Link to user profile in markdown  #87

Open
@shreyas1599

Description

@shreyas1599

Consider comment_item.
I'm trying to add a link to the profile. For example, @shreyas1599 should link to my profile. I used a simple regex to do this:

body.replaceAllMapped(new RegExp(r"@[^\s]+"), (match) { return "[${match[0]}](https://github.com/${match[0] })";

A couple of questions:

  • Should I place this in markdown_view.dart or leave it in comment_item.dart itself?
  • Also in mardown_view.dart I see you've used a github prefix. For now, I could just push the relative path.
  • But in router.dart you've added a TODO: /github.
  • So should I try and replace all the existing github routes to use the prefix github or just push the relative path for now? Something like this:
    return Provider.of<ThemeModel>(context).push(context, "/${m['login']}");
  • I could first open a PR to change all the existing routes to use /github and then implement the above.

@pd4d10 I'd like your opinion on this. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions