feat(parser): v0.1.15 — parser short+medium term improvements
Short-term fixes: - Fix ***bold italic*** / ___bold italic___ triple emphasis - Fix link text inline formatting (recursive renderInline on [**bold**](url)) - Fix backtick inline code nesting (CommonMark-compliant extractInlineCodes) - Fix tab indentation stripping in indented code blocks Medium-term improvements: - parseTokens() / renderTokens() separation API for token-level transform - registerBlockHandler() table-driven block handler registry - Backslash escape support (\* \_ \) Also: - Add 48 new test cases (583 total, 7 suites, all passing) - Parser coverage: 95.43% stmts / 91.38% branches / 100% funcs / 98.25% lines - Update README.md, site/, package.json to v0.1.15
This commit is contained in:
+9
-5
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📝</text></svg>"/>
|
||||
<title>MetonaEditor v0.1.14 — 全功能演示</title>
|
||||
<title>MetonaEditor v0.1.15 — 全功能演示</title>
|
||||
<style>
|
||||
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
|
||||
:root{--app-bg:#f5f6f8;--app-text:#1a1a2e;--app-card:#fff;--app-border:#e5e7eb;--app-accent:#3b82f6;--app-accent2:#8b5cf6;--header-bg:linear-gradient(135deg,#1e293b 0%,#0f172a 100%);--header-text:#f1f5f9;--badge-bg:rgba(255,255,255,.12);--badge-text:#e2e8f0}
|
||||
@@ -47,9 +47,9 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Micr
|
||||
<header class="header">
|
||||
<h1><span class="grad">Metona</span>Editor</h1>
|
||||
<div class="badges">
|
||||
<span class="badge">v0.1.14</span>
|
||||
<span class="badge">v0.1.15</span>
|
||||
<span class="badge">零依赖</span>
|
||||
<span class="badge">535 tests</span>
|
||||
<span class="badge">558 tests</span>
|
||||
<span class="badge">6 插件</span>
|
||||
<span class="badge">中文优先</span>
|
||||
</div>
|
||||
@@ -79,7 +79,8 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Micr
|
||||
</div>
|
||||
|
||||
<div class="info-grid">
|
||||
<div class="info-card"><div class="icon">🎨</div><h4>语法高亮编辑区</h4><p>标题/粗体/斜体/代码/链接/图片/列表等 10 种语法实时着色</p></div>
|
||||
<div class="info-card"><div class="icon">🎨</div><h4>三重强调 + 链接内格式</h4><p>***粗斜体*** / [**粗体链接**](url) 等语法正确渲染 ← v0.1.15</p></div>
|
||||
<div class="info-card"><div class="icon">🔧</div><h4>块级处理器表驱动</h4><p>registerBlockHandler 注册自定义语法,parseTokens/renderTokens 分离</p></div>
|
||||
<div class="info-card"><div class="icon">📂</div><h4>磁盘文件读写</h4><p>File System Access API 打开/保存真实磁盘 .md 文件</p></div>
|
||||
<div class="info-card"><div class="icon">🔢</div><h4>行号装订线</h4><p>当前行高亮,与编辑区滚动同步</p></div>
|
||||
<div class="info-card"><div class="icon">🧘</div><h4>Zen 专注模式</h4><p>工具栏自动隐藏,鼠标移到顶部滑入</p></div>
|
||||
@@ -90,7 +91,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Micr
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
MetonaEditor v0.1.14 ·
|
||||
MetonaEditor v0.1.15 ·
|
||||
<a href="index.html">首页</a> ·
|
||||
<a href="docs.html">API 文档</a> ·
|
||||
<a href="https://git.metona.cn/MetonaTeam/MetonaEditor" target="_blank" rel="noopener">源码仓库</a> · MIT
|
||||
@@ -135,6 +136,7 @@ var demoMd=[
|
||||
'',
|
||||
'| 版本 | 日期 | 测试 | 主题 |',
|
||||
'| :--- | :---: | ---: | --- |',
|
||||
'| v0.1.15 | 2026-07 | 558 | 三重强调+链接格式+转义+Token分离+块级表驱动 |',
|
||||
'| v0.1.14 | 2026-07 | 535+ | 语法高亮+Mermaid+文件系统 |',
|
||||
'| v0.1.12 | 2026-07 | 535 | A11y+Zen+滚动同步 |',
|
||||
'| v0.1.7 | 2026-07 | 532 | 编辑体验 |',
|
||||
@@ -174,8 +176,10 @@ var demoMd=[
|
||||
'## 🎨 文本样式',
|
||||
'',
|
||||
'- **粗体** / __另一种粗体__',
|
||||
'- ***粗斜体*** / ___另一种粗斜体___ ← v0.1.15',
|
||||
'- *斜体* / _另一种斜体_',
|
||||
'- ~~删除线~~ / ==高亮标记==',
|
||||
'- 链接内格式:[**粗体链接**](https://example.com) ← v0.1.15',
|
||||
'- 化学:H~2~O / 数学:x^2^',
|
||||
'- 代码:`const x = 42;`',
|
||||
'- Emoji::smile: :rocket: :fire: :rainbow: :coffee: :hamburger:',
|
||||
|
||||
Reference in New Issue
Block a user