-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use str.replaceAll()
with Slack link formatter function
#24
Conversation
Object.defineProperty(o, k2, { enumerable: true, get: function() { | ||
return m[k]; | ||
} }); | ||
} : function(o, m, k, k2) { | ||
if (k2 === void 0) | ||
k2 = k; | ||
if (k2 === void 0) k2 = k; |
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.
Changes to build output with latest esbuild
release.
585e978
to
77a40b8
Compare
} | ||
|
||
url = url.replace('<','<'); |
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.
This "double escape" was in error 🤦
But again, current uses of makeSlackLink()
- would not have hit this issue, but fixing up since it's still incorrect/wrong.
Thx @jasonltang 👍 |
Was incorrectly using
str.replace()
to escape&<>
characters - only would replace first instance - rather than all.https://api.slack.com/reference/surfaces/formatting#linking-urls
Granted, none of the URLs currently passed to function include these characters - but no harm in making better.
Also:
esbuild
version.semi
rule to ESLint ruleset.