app.fileManager.processFrontMatter(file,(f)=>{  
    console.log(f)
})
  • 只要调用了该方法,就会修改源文件的yaml,因为obsidian中的yaml,可能会导致注释丢失