修复: 文件预览误报脏标记与编辑丢失等一批缺陷
- 脏标记行尾归一(含裸\r),CRLF 文件打开不再误报未保存 - 防抖回灌校验发起文件+flushEmit,杜绝串文件与丢尾 - F5/tab淘汰/读失败/草稿/重命名/保存刷新六处状态一致性修复 - GBK 文件按原编码回写(接口零改动),保存不再悄悄转 UTF-8 - .sh 系高亮根修(StreamLanguage 导入源错),面包屑长名截断 - CSV 大文件门豁免+表头贴顶;空标题滤除与 iframe 边距去除 - BGM 播放器增强收编(拖拽seek/音量/连播/快捷键/路径导航折叠) - 版本 0.5.3,CHANGELOG 同步
This commit is contained in:
1 parent
e5e8054916
commit
bce14a0480
26 files changed
+1010
-138
No files matched your search
@@ -284,7 +284,9 @@ export function isMarkedReady(): boolean {
|
||||
/** 同步渲染(仅当已初始化时可用) */
|
||||
export function parseMarkdown(content: string): string {
|
||||
if (!_marked) return ''
|
||||
return _marked.parse(content) as string
|
||||
const html = _marked.parse(content) as string
|
||||
// 兜底:过滤空一级标题块(首行 `#`/`# ` 无文字产生的 <h1></h1> 空白条)
|
||||
return html.replace(/<h1(?:\s[^>]*)?>(?:\s| )*<\/h1>/g, '')
|
||||
}
|
||||
|
||||
/** 触发懒加载(可在空闲时调用) */
|
||||
|
||||
Reference in new issue
Block a user