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 11const parseEmojis = str => {
22 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 )
44}
55
6- const unescapeHtml = html => html
6+ const unescapeHtml = html => String ( html )
77 . replace ( / & q u o t ; / g, '"' )
88 . replace ( / & # 3 9 ; / g, '\'' )
99 . replace ( / & # x 3 A ; / g, ':' )
1010 . replace ( / & l t ; / g, '<' )
1111 . replace ( / & g t ; / g, '>' )
1212
13- const removeMarkdownToken = str => str
13+ const removeMarkdownToken = str => String ( str )
1414 . replace ( / ` ( .* ) ` / , '$1' ) // ``
1515 . replace ( / \[ ( .* ) \] \( .* \) / , '$1' ) // []()
1616 . replace ( / \* \* ( .* ) \* \* / , '$1' ) // **
You can’t perform that action at this time.
0 commit comments