File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
const parseEmojis = str => {
2
2
const emojiData = require ( 'markdown-it-emoji/lib/data/full.json' )
3
- return str . replace ( / : ( .+ ?) : / g, ( placeholder , key ) => emojiData [ key ] || placeholder )
3
+ return String ( str ) . replace ( / : ( .+ ?) : / g, ( placeholder , key ) => emojiData [ key ] || placeholder )
4
4
}
5
5
6
- const unescapeHtml = html => html
6
+ const unescapeHtml = html => String ( html )
7
7
. replace ( / & q u o t ; / g, '"' )
8
8
. replace ( / & # 3 9 ; / g, '\'' )
9
9
. replace ( / & # x 3 A ; / g, ':' )
10
10
. replace ( / & l t ; / g, '<' )
11
11
. replace ( / & g t ; / g, '>' )
12
12
13
- const removeMarkdownToken = str => str
13
+ const removeMarkdownToken = str => String ( str )
14
14
. replace ( / ` ( .* ) ` / , '$1' ) // ``
15
15
. replace ( / \[ ( .* ) \] \( .* \) / , '$1' ) // []()
16
16
. replace ( / \* \* ( .* ) \* \* / , '$1' ) // **
You can’t perform that action at this time.
0 commit comments