-
Notifications
You must be signed in to change notification settings - Fork 41
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
team mention pasting #91
Conversation
56a9980
to
b06f076
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️🧡💛💚💙💜🖤
@@ -123,7 +123,7 @@ function linkify(element: HTMLAnchorElement, label: string): string { | |||
let markdown = '' | |||
|
|||
// Don't linkify user mentions like "@octocat" | |||
if (isUserMention(element)) { | |||
if (isUserMention(element) || isTeamMention(element)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while here, are there other types that shouldn't become urls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattcosta7 Not that I know of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!
no problem! I don't have write access on this one @joshblack so if you're good to merge, please do when it makes sense! |
related to https://github.com/github/html_pipeline/issues/76
This pull request to the codebase includes changes to improve the handling of GitHub team mentions in the
paste()
function. The most important changes include adding a new test case to check that team handles are not rendered as markdown, and updating thelinkify()
function to check if a link is a team mention using the newisTeamMention()
function.Main interface changes:
src/paste-markdown-html.ts
: Updated thelinkify()
function to check if a link is a team mention using the newisTeamMention()
function, and returns the label as markdown if it is a team or user mention. [1] [2]Testing improvements:
test/test.js
: Added a new test case to check that team handles are not rendered as markdown in thepaste()
function.