修复汇编语言高亮,prismjs采用外部cdn加载

This commit is contained in:
tangly1024
2022-12-07 18:14:46 +08:00
parent 29f83c52d1
commit 53a7ec3602
4 changed files with 12 additions and 40 deletions

View File

@@ -72,7 +72,7 @@ function filterPostBlocks(id, pageBlock, slice) {
continue
}
count++
// 处理 c++ 和 c#两种语言
// 处理 c++ 和 c#等语言名字映射
if (b?.value?.type === 'code') {
if (b?.value?.properties?.language?.[0][0] === 'C++') {
b.value.properties.language[0][0] = 'cpp'
@@ -80,6 +80,9 @@ function filterPostBlocks(id, pageBlock, slice) {
if (b?.value?.properties?.language?.[0][0] === 'C#') {
b.value.properties.language[0][0] = 'csharp'
}
if (b?.value?.properties?.language?.[0][0] === 'Assembly') {
b.value.properties.language[0][0] = 'asm6502'
}
}
delete b?.role