release: v0.1.4 — parser enhancement, new syntax, performance optimization
feat(parser): comprehensive Markdown parser enhancement - Add nested list support (multi-level unordered/ordered, mixed nesting) - Add Setext headings (=== / ---) - Add indented code blocks (4-space indent) - Add HTML comment passthrough (<!-- -->) - Add entity reference protection (& ©) - Add ordered list start attribute - Add link title single-quote support - Add LaTeX math formulas ($inline$ / $$block$$) - Add footnote support ([^1] ref + [^1]: definition) - Add definition lists (term\n: definition) - Extend emoji map from 85 to 150+ common emojis - Fix backtick code block matching (CommonMark spec) - Fix italic regex character truncation (lookbehind assertions) - Fix superscript/subscript/strikethrough ambiguity - Fix blockquote prefix handling (>text without space) - Enhance safeUrl filtering (additional protocol checks) - Enhance slugify (Unicode NFKC normalization) perf(parser): single-pass inline scanning, render cache, pre-compiled regex - Replace 14-step chained regex with unified single-pass scanInline() - Add cachedRenderInline() with FIFO LRU eviction (300-entry cap) - Pre-compile 15+ static regex constants for block boundary detection - Skip redundant style='text-align:left' on default-aligned table cells style(parser): add CSS for footnotes, definition lists, math formulas, sup/sub test(parser): 44 new test cases covering all v0.1.4 syntax additions (469 total) chore: bump version 0.1.3 → 0.1.4 across all source files, docs, site pages
This commit is contained in:
Vendored
+5
-3
@@ -1,4 +1,4 @@
|
||||
// Type definitions for MetonaEditor
|
||||
// Type definitions for MetonaEditor v0.1.4
|
||||
// Project: https://git.metona.cn/MetonaTeam/MetonaEditor
|
||||
// Author: thzxx
|
||||
|
||||
@@ -243,10 +243,12 @@ export function getStatus(): {
|
||||
// ============ 解析器 ============
|
||||
/** Markdown 解析函数 */
|
||||
export function parseMarkdown(markdown: string, env?: RenderEnv): string;
|
||||
/** URL 安全过滤 */
|
||||
/** URL 安全过滤(增强版) */
|
||||
export function safeUrl(url: string): string;
|
||||
/** 生成标题锚点 id */
|
||||
/** 生成标题锚点 id(Unicode NFKC 规范化) */
|
||||
export function slugify(text: string): string;
|
||||
/** 清除渲染缓存(主题切换等场景) */
|
||||
export function clearRenderCache(): void;
|
||||
|
||||
// ============ 插件 ============
|
||||
/** 预设插件表 */
|
||||
|
||||
Reference in New Issue
Block a user