pluk-inc/markdown-preview
70.1
Strong · 1 October 2026
27.4k
lines of production code
Swift
with JavaScript
2
measurements over time
What this system is
This system is a native macOS Markdown Preview application and Quick Look extension that provides a dual-pane editing and rendering experience. It supports a wide range of Markdown extensions, including Mermaid diagrams, LaTeX math, and syntax-highlighted code blocks, while ensuring security through HTML sanitization. The application includes robust features for document management, such as fuzzy file search, auto-save, and customizable themes, alongside automated tooling for release management and performance benchmarking.
Features
Add CPU/memory benchmark harness for Markdown Preview and Quick Look
Developers can now run local and automated performance benchmarks for the Markdown Preview app and its Quick Look extension. The new \scripts/bench\ directory provides shell scripts (\bench-app.sh\, \bench-ql.sh\) to capture CPU, memory, and render timings from Debug builds, alongside Python tools (\report.py\, \compare\_performance.py\, \post\_performance\_report.py\) to compare baselines against candidates and post results to pull requests. This includes a stress test sample (\mermaid-heavy.md\) and a file-search benchmark to help track performance regressions in rendering and search.
scripts/bench · high confidence
Add Claude skills configuration
The .claude directory now includes a skills configuration that registers four new skills: amore-cli, changelog-maintenance, release-process, and swift-concurrency. These skills are implemented as symbolic links pointing to their respective definitions in the .agents/skills directory, making them available for use within the Claude environment.
.claude · high confidence
Add code syntax highlighting to markdown previews
Markdown previews now support syntax highlighting for code blocks. This change vendors highlight.js v11.10.0 and includes specific language support for HCL and Terraform, ensuring that code snippets in these formats are rendered with appropriate colorization and formatting.
md-preview/Vendor/Highlight · high confidence
Added Simplified Chinese localization for the Markdown Preview app
The app now supports Simplified Chinese (zh-Hans), providing translated strings for the user interface, menus, settings, and inspector. Users can now interact with the application in Simplified Chinese, covering elements such as the main menu, toolbar, export options, and privacy settings.
md-preview/zh-Hans.lproj · high confidence
Added macOS shell wrapper for the Markdown Preview app
A new shell script named 'markdown-preview' has been added to the Resources/bin directory. This script acts as a launcher for the 'doc.md-preview' application bundle on macOS, allowing users to open the app directly from the command line by executing the script with or without arguments.
Resources · high confidence
App initialization, document handling, and privacy controls
The application now includes a new native flow for creating documents, automatically entering edit mode with autofocus when a new file is created. It supports opening .mdx files alongside standard Markdown formats and allows opening folders directly from the file open panel. A 'What's New' window is shown on launch to inform users of updates. The app also integrates Sentry for anonymous crash reporting and PostHog for anonymous usage analytics, both of which are opt-in (with crash reporting enabled by default) and designed to exclude sensitive document content and user identity data.
md-preview/App · high confidence
Automated vendor bundling and release tooling for Markdown Preview
This change introduces a suite of build and release scripts that streamline the Markdown Preview app's distribution and internal asset management. The new \bundle-highlight.py\ and \bundle-katex.py\ scripts automatically download and package the highlight.js and KaTeX libraries (including syntax highlighting for HCL/Terraform and inlined KaTeX fonts) into self-contained vendor files, ensuring the app works offline without CDN dependencies. Static smoke tests (\check-math-html.py\, \check-mermaid-html.py\) verify that the Markdown renderer correctly integrates these libraries and handles math/mermaid syntax. Finally, \release.sh\ and \rollback-release.sh\ automate the versioning, DMG creation via Amore, and GitHub release management, including support for beta releases and safe rollbacks.
scripts · high confidence
Initial application menu structure for Markdown Preview
The app now includes a standard macOS main menu (MainMenu.xib) defining the core user interface shell. This menu provides the File menu with options for creating, opening, saving, and exporting documents (including PDF export), the Edit menu with standard text editing commands (undo, redo, cut, copy, paste, find), and the application menu with standard macOS items like About, Check for Updates, Services, and Quit.
md-preview/Base.lproj · high confidence
Initial project scaffolding and documentation
The repository is initialized with the core configuration and documentation files required to build and release the Markdown Preview app. This includes the \AGENTS.md\ guide for development workflows, a comprehensive \CHANGELOG.md\ tracking releases up to version 0.0.64, and the \Info.plist\ defining the app's identity, supported Markdown file extensions (including \.mdx\), and URL schemes. The setup also establishes the centralized versioning in \Version.xcconfig\, the Sparkle update feed in \appcast.xml\, and the \README.md\ detailing features like native rendering, Mermaid diagram support, and privacy-filtered crash reporting.
(repo-wide) · high confidence
Initial project structure for Markdown Preview and Quick Look extension
This change introduces the Xcode project configuration for the Markdown Preview app and its Quick Look extension. It establishes the build targets, links essential frameworks (Quartz, Sparkle, Sentry, and the Markdown library), and bundles vendor JavaScript libraries for rendering Mermaid diagrams, KaTeX math, syntax highlighting, and HTML sanitization. The project also sets up localization resources for English and Simplified Chinese, and configures the embedding of the Quick Look app extension and a CLI tool.
md-preview.xcodeproj · high confidence
Initial project workspace and data model setup
The application now includes a configured Xcode workspace and an initial, empty Core Data model (md\_preview.xcdatamodel). This establishes the foundational project structure and data persistence schema required for the app to build and run, though no entities or relationships have been defined yet.
_md-preview.xcodeproj/project.xcworkspace, md-preview/md\preview.xcdatamodeld · high confidence
Introduce 'Search for Document' palette with fuzzy file matching
Adds a new 'Search for Document' feature that lets users quickly find and open files by typing a partial name. The implementation includes a fuzzy matching engine that ranks project files and recent documents, a floating palette UI for selection, and logic to handle multi-display placement and long path truncation. The file index walks the project directory (excluding common dependency folders) and caches results to ensure fast performance even in large projects.
md-preview/Features/FileSearch · high confidence
Introduce Document Window Controller with Edit Mode, Autosave, and Search
The document window controller is now implemented as a set of focused extensions, introducing a dedicated edit mode that allows users to modify Markdown source directly. This includes an automatic save feature that persists changes at a configurable interval, a debounced in-document search bar for finding text within the preview, and a new 'Search for Document' palette to locate and open files by name. The controller also manages the formatting accessory bar (native on older macOS, Liquid Glass on macOS 26+), handles document opening and tabbing logic, and supports an 'Always on Top' window state.
md-preview/Document · high confidence
Introduce dedicated Markdown editor with live syntax highlighting and code language support
The application now includes a dedicated inline editor for Markdown documents, replacing the previous read-only or basic editing experience. This new editor provides live syntax highlighting for headings, emphasis, quotes, and code blocks as you type, ensuring the editing view visually matches the preview. It supports a comprehensive catalog of programming languages for fenced code blocks, complete with language-specific glyphs and recent-language tracking. The editor also features a native find-and-replace bar with match counting and navigation, and handles image pasting and clicking. This change is grounded in the addition of \CodeLanguageCatalog.swift\ for language definitions, \EditorHTML.swift\ for the CodeMirror-based rendering engine, \EditorViewController.swift\ for the WebKit integration and chrome management, and \FindBar.swift\ for the search UI.
md-preview/Features/Editor · high confidence
New 'What's New' window highlights recent updates
Readers updating from a build older than 0.0.62 (build 66) will now see a dedicated window on their next launch, announcing features such as fast document search, redesigned code blocks, and a Liquid Glass formatting bar on macOS 26. The window appears once per major version and can also be accessed via Help › What's New in Markdown Preview.
md-preview/Features/WhatsNew · high confidence
New Markdown Quick Look extension with native editing and asset support
A new Quick Look extension is introduced, enabling native text selection (⌘A/⌘C) and cursor feedback within the preview. It supports rendering relative local images by embedding them as attachments, applies the system's light/dark appearance mode, and fixes code-block copy functionality via a native pasteboard bridge. The extension also registers support for common Markdown extensions (including .mdx) and ensures keyboard focus is not stolen on load to preserve host file navigation.
quick-look · high confidence
New agent skills for Amore CLI distribution and release management
Added new agent skills under \.agents/skills/\ to guide AI agents through macOS app distribution via the Amore CLI and to standardize the project's release process. The \amore-cli\ skill provides comprehensive documentation on the Amore CLI workflow, including authentication, app setup, code signing, notarization, DMG creation, Sparkle integration, S3 self-hosting, and licensing with Stripe. The \release-process\ skill defines the branch/PR naming conventions, version bumping in \Version.xcconfig\, changelog maintenance, and the execution of \scripts/release.sh\ for publishing updates. These skills ensure consistent handling of external distribution and internal release workflows.
.agents · high confidence
New rendering infrastructure and reading experience controls
This change introduces a new rendering architecture for the Markdown preview, including a document snapshot cache for faster load times, a JavaScriptCore-based code highlighter for immediate syntax coloring, and a curated set of document font settings (such as Athelas, Charter, and Merriweather) that allow users to customize the reading typography. It also adds support for Obsidian-style highlight syntax (==text==), native confirmation dialogs for external links, and fixes for window dragging under transparent titlebars and code block copy buttons.
md-preview/Rendering · high confidence
New theme customization and full-screen toolbar fixes
Users can now customize specific theme colors (window background, text, links, code blocks) via a new settings interface, with changes persisted per appearance mode and applied to both the preview and editor surfaces. Additionally, the full-screen toolbar now correctly maintains its background color and style on macOS 26 by fixing private AppKit scroll pocket rendering, ensuring the toolbar matches the document theme even when moved to a separate window.
md-preview/Theme · high confidence
Support for opening files via custom URL scheme and sandbox configuration
The app now supports the 'md-preview://' URL scheme, allowing external applications and browsers to open specific Markdown files directly within the previewer. This capability is enabled by a new 'ExternalOpenScheme' component that resolves these custom links to local file paths. Additionally, the app's entitlements have been configured to support this functionality and broader file access, including read-only access to the filesystem for the project navigator and Quick Look, as well as permissions for printing and Apple Events.
md-preview · high confidence
Support for rendering LaTeX math equations in markdown previews
Users can now view LaTeX math equations rendered as formatted text within markdown previews. This change vendors the KaTeX library (version 0.16.45) into the project, including its CSS styles and JavaScript logic, to handle the client-side rendering of mathematical expressions.
md-preview/Vendor/KaTeX · high confidence
Security
Added DOMPurify for sanitizing rendered markdown HTML
The markdown preview now sanitizes rendered HTML using DOMPurify (version 3.4.2) to prevent cross-site scripting (XSS) attacks. This change vendors the DOMPurify library and its license file into the project, ensuring that any HTML generated from markdown content is cleaned before being displayed to the user.
md-preview/Vendor/DOMPurify · high confidence
Behavioural changes
Added Xcode build schemes for Markdown Preview and Quick Look extension
The project now includes defined Xcode schemes for the main Markdown Preview app and the Quick Look app extension. These schemes configure how the targets are built, tested, and launched, including specific launch arguments for the main app to control its default handler behavior and setup for the extension to prompt the user for an app to launch.
md-preview.xcodeproj/xcshareddata · high confidence
Improved Mermaid diagram popup navigation and context
The Mermaid diagram popup now supports precise mouse-wheel zooming and pointer-based panning, allowing users to navigate large diagrams independently of the window size. Pressing the Space key resets the view to the initial scale and position. Additionally, the popup window title now includes the nearest preceding Markdown heading (e.g., "Section Title — Mermaid diagram") for better context when switching between diagrams, and the popup is centered on the screen's visible frame rather than the document window.
md-preview/Features/Mermaid · high confidence
Mermaid renderer updated to version 11.15.0
The offline Mermaid diagram renderer has been upgraded to version 11.15.0. This update includes an upstream fix for \block-beta\ diagrams that ensures dotted strokes and arrowheads are rendered correctly, resolving previous issues where these visual elements were missing or incorrect.
md-preview/Vendor/Mermaid · high confidence
New preference settings for window behavior, language, and text size
The Preferences module now includes dedicated logic for several user-configurable options. Users can enable 'Always on Top' to keep preview windows floating above other applications, with specific handling for full-screen mode and settings window layering. A new 'App Language' setting allows switching the application interface language independently of the system default. The 'Auto Save' interval is now configurable, supporting both minute-based intervals and a 30-second option. 'Tab Opening' preferences let users control whether documents open in new tabs or windows, respecting both app and system tabbing preferences. Finally, 'Text Size' settings provide three named zoom levels (Small, Medium, Large) that sync with the document window's zoom state.
md-preview/Preferences · high confidence
Reorganized settings into a dedicated window with new Reading and Appearance panes
The application settings have been restructured into a new, dedicated Settings window featuring General, Reading, Appearance, Privacy, and About panes. The Reading pane now centralizes text size, content width, text alignment, strict line breaks, and outline highlighting controls. The Appearance pane provides a theme gallery, light/dark mode selection, and access to a Customize Theme sheet for adjusting fonts, spacing, and colors. General settings now include app language switching, window behavior options (always on top, tabs, link handling), auto-save intervals, and external app configuration. The About pane displays version information and update controls, while the Privacy pane manages crash reports and usage analytics.
md-preview/Features/Settings · high confidence
Sidebar reorganized into Outline and Project Navigator modes with improved TOC parsing
The sidebar now supports two distinct views: an Outline mode that displays the document's table of contents, and a Project Navigator mode that shows the file system structure of the current folder. Switching between these modes is persisted in user settings. The Table of Contents parsing has been fixed to correctly ignore code blocks inside lists, preventing code content from appearing as navigation entries. Additionally, the Project Navigator now watches for file system changes and updates the tree in real-time while preserving the user's expansion state and selection.
md-preview/Features/Sidebar · high confidence
Updated CodeMirror editor vendor bundle
The CodeMirror editor vendor bundle (mdedit.min.js) and its license file have been updated. This brings in fixes for table editing interactions, RTL support, search highlighting, CJK input method composition states, and irregular vertical spacing, along with improvements to scroll synchronization and selection stability.
md-preview/Vendor/CodeMirror, scripts/editor-bundle · high confidence
Test coverage
Added automated tests for checkbox saving and editor mode transitions; Added performance regression benchmark suite; Added test helpers for Markdown rendering and settings; Added test helpers for Quick Look preview behaviors; Added tests for Quick Look preview helper behaviors; Expanded test coverage for MarkdownHelpers settings and rendering logic.
Dependencies
Add morphdom library to Markdown preview vendor dependencies
The md-preview component now includes the morphdom library (version 2.7.8) as a vendored dependency. This adds the minified JavaScript source, version tracking, and MIT license file to the project, enabling the Markdown preview to utilize morphdom for efficient DOM diffing and patching operations.
md-preview/Vendor/Morphdom · high confidence
Introduce CodeMirror 6 editor bundle and Swift test scaffolding
This change adds a new Node.js-based build pipeline for the Markdown editor, establishing a dedicated \scripts/editor-bundle\ directory with \package.json\ and \package-lock.json\. This bundle integrates CodeMirror 6 (including language extensions for CSS, HTML, JavaScript, JSON, Markdown, Python, and YAML, plus HCL support via \codemirror-lang-hcl\) and uses esbuild for bundling. Additionally, it introduces a Swift Package Manager manifest (\tests/swift-tests/Package.swift\) to scaffold unit tests for the app's rendering and Quick Look helpers, depending on \swift-markdown\ version 0.7.3.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 71 → 70 (-1.1)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 81 → 81 (-0.4)
- Architecture 93 → 98 (+4.5)
- Maturity 73 → 72 (-0.7)
- Readiness 62 → 61 (-1.6)
- Security 99 → 98 (-0.9)
- Performance 79 (new)
Resolved (19)
- ClassTooLong: EditorViewController (md-preview/Features/Editor/EditorViewController.swift)
- Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
- Duplicated block (11 lines × 2) (md-preview/Document/ContentViewController.swift)
- Duplicated block (12 lines × 2) (md-preview/Features/Settings/SettingsModel.swift)
- Duplicated block (6–7 lines × 2) (md-preview/Document/MainSplitViewController.swift)
- Duplicated block (7 lines × 2) (md-preview/Features/Editor/EditorViewController.swift)
- Duplicated block (8–10 lines × 2) (md-preview/Rendering/MarkdownHTML+Math.swift)
- Duplicated block (9 lines × 2) (md-preview/Document/DocumentWindowController+Toolbar.swift)
- FileTooLong: Editor/EditorViewController.swift (md-preview/Features/Editor/EditorViewController.swift)
- High: security finding (details withheld)
- Hotspot: md-preview/Rendering/CodeFenceInfo.swift (md-preview/Rendering/CodeFenceInfo.swift)
- Hotspot: md-preview/Rendering/MarkdownAssetResolution.swift (md-preview/Rendering/MarkdownAssetResolution.swift)
- Hotspot: md-preview/Rendering/MarkdownFrontmatter.swift (md-preview/Rendering/MarkdownFrontmatter.swift)
- Hotspot: quick-look/PreviewViewController.swift (quick-look/PreviewViewController.swift)
- Low cohesion: EditAccessoryContainerView (LCOM4 5) (md-preview/Document/DocumentWindowController.swift)
- MethodTooLong: DocumentWindowController.applyAutoSaveIntervalSetting (md-preview/Document/DocumentWindowController.swift)
- MethodTooLong: EditorViewController.editorHTML (md-preview/Features/Editor/EditorViewController.swift)
- MethodTooLong: MarkdownHTML.render (md-preview/Rendering/MarkdownHTML.swift)
- Workflow token permissions not restricted
New (85)
- ClassTooLong: MainSplitViewController (md-preview/Document/MainSplitViewController.swift)
- CodeLanguageWidget.toDOM (cognitive 19) (scripts/editor-bundle/entry-cm.js)
- CodeLanguageWidget.toDOM (cyclomatic 20) (scripts/editor-bundle/entry-cm.js)
- Coverage not measured — Swift suite
- DocumentWindowController.updateFormattingSelection (cognitive 24) (md-preview/Document/DocumentWindowController.swift)
- Duplicated block (12–13 lines × 2) (md-preview/Document/DocumentWindowController+Find.swift)
- Duplicated block (13 lines × 2) (md-preview/Rendering/EscapingHTMLFormatter.swift)
- Duplicated block (13–17 lines × 2) (md-preview/Document/DocumentWindowController+FormattingBar.swift)
- Duplicated block (15 lines × 2) (md-preview/Features/Settings/SettingsModel.swift)
- Duplicated block (17–19 lines × 2) (md-preview/Document/ContentViewController.swift)
- Duplicated block (5 lines × 2) (md-preview/Document/DocumentWindowController+Find.swift)
- Duplicated block (6 lines × 2) (md-preview/Document/DocumentWindowController+FormattingBar.swift)
- Duplicated block (6–7 lines × 2) (md-preview/Rendering/MarkdownHTML+Mermaid.swift)
- Duplicated block (7 lines × 2) (md-preview/Document/DocumentWindowController+Find.swift)
- Duplicated block (7 lines × 3) (md-preview/Rendering/EscapingHTMLFormatter.swift)
- Duplicated block (8 lines × 3) (md-preview/Document/DocumentWindowController+Find.swift)
- Duplicated block (8–10 lines × 2) (scripts/bundle-highlight.py)
- Duplicated block (8–9 lines × 3) (md-preview/Document/DocumentWindowController+FileSearch.swift)
- EditorViewController.handle (cognitive 24) (md-preview/Features/Editor/EditorViewController.swift)
- EscapingHTMLFormatter.visitCodeBlock (cyclomatic 20) (md-preview/Rendering/EscapingHTMLFormatter.swift)
- …and 65 more
Changes since last survey
- 51 commits — 28 feature/other, 23 fixes
By area
- md-preview/Document — 12 commits
- (root) — 9 commits
- tests/swift-tests — 9 commits
- md-preview/Rendering — 8 commits
- md-preview/Features — 6 commits
- scripts/editor-bundle — 4 commits
- md-preview/Vendor — 1 commit
- scripts/bench — 1 commit
- tests/performance — 1 commit
Notable commits
- fix: Fix Markdown marker colors and theme-aware list accents (#435)
- fix: Fix Mermaid block dotted arrows with renderer 11.15.0 (#441)
- fix: Fix Original appearance persistence and native document backgrounds (#420)
- fix: Fix WebKit chrome colors after automatic appearance changes (#416)
- fix: Fix back and forward toolbar appearance (#418)
- fix: Fix benchmark source selection across PR revisions (#410)
- fix: Fix editor state when switching files in the sidebar (#434)
- fix: Fix file search palette placement across displays (#463)
- fix: Fix initial edit focus and benchmark image readiness (#415)
- fix: Fix macOS 15 sidebar toolbar placement and editor background (#438)
- fix: Fix middle truncation of long search result paths (#455)
- fix: Fix navigation collapse and file-search field alignment (#452)
- fix: Fix overlapping text when switching reader and editor modes (#432)
- fix: Fix reader scroll gestures being swallowed by article overflow (#442)
- fix: Fix saving pending edits in preview mode (#436)
- fix: Fix search highlighting and navigation in edit mode (#404)
- fix: Fix text size changes in Edit mode (#454)
- fix: Keep Read Mode read-only and fix table editing interactions (#456)
- fix: Keep sidebar controls visible and fix image alignment and spacing (#401)
- fix: Lock fixed-color themes to their intended appearance (#421)
- …and 31 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
pluk-inc/markdown-preview was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0df3a0cd25ff5c014b2a72d6769e77916859a797 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.