We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 565894f commit 5023d19Copy full SHA for 5023d19
lib/util/parseHeaders.js
@@ -1,16 +1,16 @@
1
const parseEmojis = str => {
2
const emojiData = require('markdown-it-emoji/lib/data/full.json')
3
- return str.replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder)
+ return String(str).replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder)
4
}
5
6
-const unescapeHtml = html => html
+const unescapeHtml = html => String(html)
7
.replace(/"/g, '"')
8
.replace(/'/g, '\'')
9
.replace(/:/g, ':')
10
.replace(/</g, '<')
11
.replace(/>/g, '>')
12
13
-const removeMarkdownToken = str => str
+const removeMarkdownToken = str => String(str)
14
.replace(/`(.*)`/, '$1') // ``
15
.replace(/\[(.*)\]\(.*\)/, '$1') // []()
16
.replace(/\*\*(.*)\*\*/, '$1') // **
0 commit comments