website: update create.mjs

This commit is contained in:
jaywcjlove 2022-11-22 22:47:25 +08:00
parent de8a0bc0e9
commit 14767b02da

View File

@ -25,6 +25,7 @@ export function create(str = '', options = {}) {
description = (description[0] || '')
.replace(/^\n[=\n]+/, '')
.replace(/\[([\s\S]*?)?\]\(([\s\S]*?)?\)/g, '$1')
.replace(/<!--([\s\S]*?)-->/gi, '')
.replace(/\n/, '');
const subTitle = options.filename && !options.isHome ? `${options.filename} cheatsheet & ` : '';
/** 用于搜索数据 */