mirror of
https://github.com/purocean/yn.git
synced 2026-10-12 23:31:39 +08:00
小工具和drawio渲染校验代码类型
This commit is contained in:
@@ -9,7 +9,7 @@ const RunPlugin = (md) => {
|
||||
|
||||
const code = token.content.trim()
|
||||
const firstLine = code.split(/\n/)[0].trim()
|
||||
if (!firstLine.includes('--applet--')) {
|
||||
if (token.info !== 'html' || !firstLine.includes('--applet--')) {
|
||||
return temp(tokens, idx, options, env, slf)
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ const Plugin = md => {
|
||||
|
||||
const code = token.content.trim()
|
||||
const firstLine = code.split(/\n/)[0].trim()
|
||||
if (!firstLine.includes('--drawio--')) {
|
||||
if (token.info !== 'xml' || !firstLine.includes('--drawio--')) {
|
||||
return fenceTemp(tokens, idx, options, env, slf)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user