alechoey / slack-hawk-down Goto Github PK
View Code? Open in Web Editor NEWThe new official repo for slack-hawk-down
The new official repo for slack-hawk-down
When using slack-hawk-down
in a typescript project it would be nice for the .d.ts files to be built.
I should also mention that the exposed methods currently return type "any" when they should be "string". I believe this is because of this method:
import XRegExp from 'xregexp';
import { emojiAliasPattern, emojiPattern } from './patterns';
import emoji from './staticEmoji';
import { EmojiMap } from './types';
export const replaceEmoji = (text: string, customEmoji: EmojiMap) => {
Either explicitly mark it : string => {
and/or make sure that the @types/xregexp
is included in the project as I believe this is where the "any" comes from.
I am getting a SyntaxError: Invalid regular expression: invalid group specifier name
error when running our app in Safari when using slack-hawk-down
.
Stackoverflow seems to agree that this is caused by a Regex lookbehind not being supported by Safari.
To reproduce:
import { escapeForSlack, escapeForSlackWithMarkdown } from 'slack-hawk-down';
var result = escapeForSlack('This should be a smiley :smile:')
Works fine in Chrome and Firefox, but fails in Safari.
Nice work, thanks, looking forward to the upcoming changes, typescript change is great.
Might be more useful to use or provide function to utilize the default API response format, might be better to start having the full object around rather than just the namings
Upcoming changes will allow for tag wrapping around usernames/channels? ex: <div class="user">@example</div>
, or <div class="user" data-user-name="@example">@example</div>
, might be useful to allow for some interpolation here or at least drop in the values as keys as well
Cool stuff ๐
v0.5.3
second >
in > back to back\n> inline quotes
renders as >.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.