整理した
This commit is contained in:
parent
8a279a4656
commit
cf33e483f7
552 changed files with 360 additions and 1311 deletions
14
src/common/text/elements/emoji.ts
Normal file
14
src/common/text/elements/emoji.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Emoji
|
||||
*/
|
||||
|
||||
module.exports = text => {
|
||||
const match = text.match(/^:[a-zA-Z0-9+-_]+:/);
|
||||
if (!match) return null;
|
||||
const emoji = match[0];
|
||||
return {
|
||||
type: 'emoji',
|
||||
content: emoji,
|
||||
emoji: emoji.substr(1, emoji.length - 2)
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue