可以用 templater 插件实现
<%*
let r = /```([\s\S]*?)```/mg
let content = tp.file.content
let la = [ "autohotkey", "bash", "basic", "batch", "c", "csharp", "cpp", "css", "docker", "fortran", "golang", "haskell", "html", "ini", "java", "javascript", "json", "kotlin", "less", "lua", "makefile", "markdown", "matlab", "nginx", "objectivec", "perl", "php", "plaintext", "powershell", "python", "r", "ruby", "rust", "sass", "scala", "scheme", "shell", "sql", "swift", "typescript", "vim", "wiki", "yaml" ]
let l = await tp.system.suggester(la,la,'Language')
if(!l) return
let b = content.match(r)
for(let i of b)
content = content.replace(i,'```'+l+'\n'+i.split('\n').slice(1).join('\n'))
await app.vault.modify(tp.file.find_tfile(tp.file.path(1)),content)
-%>