题目搜索,收藏功能

This commit is contained in:
undefined committed 2020-06-24 13:39:32 +08:00
1 parent a248425db6
commit 441eeadaf3
23 files changed
+158 -97

No files matched your search

-15
View File
@@ -34,19 +34,4 @@ module.exports = {
console.error('Cannot hack yargs');
}
},
'markdown-it-katex': () => {
const p = require.resolve('markdown-it-katex');
const file = fs.readFileSync(p).toString().split('\n');
if (file[27].includes('if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \\t */ ||')) {
file[27] = 'if (prevChar === 0x09/* \\t */ ||';
} else if (!file[27].includes('if (prevChar === 0x09/* \\t */ ||')) {
console.error('Cannot hack markdown-it-katex');
}
if (file[31].includes('if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \\t */) {')) {
file[31] = 'if (nextChar === 0x09/* \\t */) {';
} else if (!file[27].includes('if (nextChar === 0x09/* \\t */) {')) {
console.error('Cannot hack markdown-it-katex');
}
fs.writeFileSync(p, file.join('\n'));
},
};