提交 5023d195 编写于 作者: U ULIVZ

fix: title cannot be number at front matter (#297)

上级 565894f3
const parseEmojis = str => {
const emojiData = require('markdown-it-emoji/lib/data/full.json')
return str.replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder)
return String(str).replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder)
}
const unescapeHtml = html => html
const unescapeHtml = html => String(html)
.replace(/"/g, '"')
.replace(/'/g, '\'')
.replace(/:/g, ':')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
const removeMarkdownToken = str => str
const removeMarkdownToken = str => String(str)
.replace(/`(.*)`/, '$1') // ``
.replace(/\[(.*)\]\(.*\)/, '$1') // []()
.replace(/\*\*(.*)\*\*/, '$1') // **
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册