Skip to content

Commit

Permalink
Merge pull request benawad#2767 from amitojsingh366/patch-60
Browse files Browse the repository at this point in the history
chore(kebab): add new token
  • Loading branch information
amitojsingh366 authored May 15, 2021
2 parents f0f08bc + ffbe74c commit 8d9f089
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions kebab/src/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export type MentionToken = MessageToken<"mention", string>;
export type LinkToken = MessageToken<"link", string>;
export type EmoteToken = MessageToken<"emote", string>;
export type CodeBlockToken = MessageToken<"block", string>;
export type EmojiToken = MessageToken<"emoji", string>;

export type Message = {
id: UUID;
Expand Down
1 change: 1 addition & 0 deletions kebab/src/util/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const tokensToString = (tokens: MessageToken[]): string => tokens
case "link": return it.v;
case "emote": return `:${it.v}:`;
case "block": return `\`${it.v}\``;
case "emoji": return it.v;
default: return "";
}
})
Expand Down

0 comments on commit 8d9f089

Please sign in to comment.