Fix Prism resources after initial preview render#427
Open
mrrnb wants to merge 2 commits into
Open
Conversation
- 在预览 WebView 主 frame 完成加载后显式调用 Prism.highlightAll() - 让首次打开 Markdown 的代码块高亮行为与设置里 Reload 后保持一致 - 已验证 Release 构建通过,并安装到本机 /Applications/MacDown 3000.app
- 比较预览 HTML 的 head 与 script 标签资源签名 - 当 Prism 语言脚本等资源变化时跳过 body-only DOM replacement,避免沿用旧脚本集合 - 已用临时 DOM dump 验证首次打开包含 prism-bash、token span 与 Bash 语言标签 - 已验证 Release 构建通过,并安装到本机 /Applications/MacDown 3000.app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<head>plus script tags) before using body-only DOM replacement.Testing
xcodebuild -quiet -workspace "MacDown 3000.xcworkspace" -scheme MacDown -configuration Release -destination 'platform=macOS,arch=arm64' build\n- Installed the Release app locally at/Applications/MacDown 3000.app.\n- Verified with a temporary DOM dump that first open includesprism-bash.min.js,span.tokenelements, and theBashshow-language label without pressing Reload.