mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-06 11:48:50 -05:00
[GH-ISSUE #87] Link to user profile in markdown #2511
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shreyas1599 on GitHub (May 12, 2020).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/87
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:
markdown_view.dartor leave it incomment_item.dartitself?githubprefix. For now, I could just push the relative path.router.dartyou've added a TODO: /github.githubor just push the relative path for now? Something like this:return Provider.of<ThemeModel>(context).push(context, "/${m['login']}");/githuband then implement the above.@pd4d10 I'd like your opinion on this. Thanks.
@pd4d10 commented on GitHub (May 12, 2020):
If the purpose is to replace
@somebodywith a link, it seems not enough to just tweak the onTapLink method.We should add a plugin to flutter_markdown to identify the
@somebodysyntax, then turn it into a link.@pd4d10 commented on GitHub (May 12, 2020):
Yeah, it is a legacy todo. We should open an issue for this: Add
/githubprefix to GitHub related screens, just like other platforms.@pd4d10 commented on GitHub (May 12, 2020):
Oh, I missed this replacement process. This might also work but it seems more common to write a plugin for flutter_markdown
@shreyas1599 commented on GitHub (May 16, 2020):
Sorry, I don't exactly understand. I've never written one before. By plugin do you mean, I use
flutter_markdownand create a package that identifies the@symbol and converts it into a link? Can you give an example of writing a plugin for a package?@pd4d10 commented on GitHub (May 17, 2020):
MarkdownBodyhas a property namedextensionSet: https://pub.dev/documentation/flutter_markdown/latest/flutter_markdown/MarkdownBody-class.htmlFor examples see: https://pub.dev/packages/markdown#syntax-extensions
@pd4d10 commented on GitHub (May 17, 2020):
There is also a legacy issue related to this: Rendering
<img>tag correctly.<img>seems to be frequently used.