fix: stability improvements — initialize _outlineTimer, extract INLINE_RE constant
- core.js: initialize this._outlineTimer = null in constructor (fixes clearTimeout(undefined)) - parser.js: extract INLINE_RE to module-level constant (avoid recompilation on every scanInline call)
This commit is contained in:
@@ -109,6 +109,7 @@ class MarkdownEditor {
|
||||
this._shortcuts = []; // v0.1.6: 快捷键注册表
|
||||
this._contextMenuItems = []; // v0.1.6: 右键菜单项
|
||||
this._customActions = {}; // 自定义工具栏动作
|
||||
this._outlineTimer = null; // 大纲防抖计时器
|
||||
|
||||
// 渲染函数:自定义覆盖内置解析器
|
||||
this._renderFn = (typeof this.config.render === 'function') ? this.config.render : parseMarkdown;
|
||||
|
||||
Reference in New Issue
Block a user