mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 00:14:07 +01:00
ECharts 图表块支持 loose-json (#6917)
* 🎨 ECharts 图表块支持 loose-json * 📝 更新用户手册 ECharts 相关内容 * 📝 更新用户手册 ECharts 相关内容
This commit is contained in:
parent
a96d6a019f
commit
27c9ac2b25
5 changed files with 799 additions and 28 deletions
|
|
@ -45,3 +45,8 @@ export const isDynamicRef = (text: string) => {
|
|||
export const isFileAnnotation = (text: string) => {
|
||||
return /^<<assets\/.+\/\d{14}-\w{7} ".+">>$/.test(text);
|
||||
};
|
||||
|
||||
// REF https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/eval
|
||||
export const looseJsonParse = (text: string) => {
|
||||
return Function(`"use strict";return (${text})`)();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue