Repository navigation
Re-Factor MarkText with electron-vite - #4001
Merged
Merged
Conversation
…age-changed update
- Add translations for themes: cadmiumLight, graphiteLight, materialDark, oneDark, ulyssesLight - Add translations for paper sizes: A3, A4, A5, Legal, Letter, Tabloid, Liber - Add translations for image services: GitHub, SM.MS, Imgur, PicGo - Add translations for diagram types: PlantUML, Mermaid, Vega, KaTeX, MathJax - Add translations for UI elements: Tweet, OK, HTML - Add translations for line endings: CRLF, LF - Add translations for about dialog: title, marktext - Fix preferences categories and other missing translations
- Add PicGo install commands for npm/yarn/pnpm - Add GitHub token translation - Add PicGo settings title - Add delimiter translations for front matter, math, diagrams - Add code fence translation
- Fixed 326 empty string values in 8 language files - Filled with corresponding English translations: - Theme names (Cadmium Light, One Dark, etc.) - Paper sizes (A3, A4, A5, Legal, etc.) - Image services (GitHub, SM.MS, Imgur, PicGo) - Diagram types (PlantUML, Mermaid, KaTeX) - UI elements (Zoom, OK, HTML, Tweet) - Language options in dropdown - Preferences categories and titles - Editor settings and commands - Export and import settings - Quick insert hints and tooltips - All locale files now have complete translations without empty values
- 在 preload 中增加对 macOS 常见 PicGo 安装路径的直接检查 - 扩展 resolvePicgoBinary 函数的候选路径列表 - 解决生产环境 PATH 环境变量受限导致的检测失败问题
feat: Add close button for macOS preference window
…oothen out key search
…for windows god damn i hate it
…by Proxy objects due to Pinia reactivity. Switched findIndex to use keys instead of obj references
Blueteemo
added a commit
to Blueteemo/marktext
that referenced
this pull request
May 26, 2026
Re-introduce the per-extension icon: icons/md.ico mapping in ileAssociations so Markdown files use the dedicated document icon (�uild/icons/md.ico) instead of falling back to the application logo. The dedicated icon was lost during the electron-vite refactor in marktext#4001 when each extension was split into its own entry without copying over the original `icon` field. The icon assets are still shipped via `extraResources` (`resources/icons/md.ico` is present in the install), they were simply not referenced. Apply the same icon to all six Markdown extensions (md, markdown, mmd, mdown, mdtxt, mdtext) to match v0.17.x behavior.
Blueteemo
added a commit
to Blueteemo/marktext
that referenced
this pull request
May 26, 2026
Re-introduce the per-extension `icon: icons/md.ico` mapping in `fileAssociations` so Markdown files use the dedicated document icon (`build/icons/md.ico`) instead of falling back to the application logo. The dedicated icon was lost during the electron-vite refactor in marktext#4001 when each extension was split into its own entry without copying over the original `icon` field. The icon assets are still shipped via `extraResources` (`resources/icons/md.ico` is present in the install), they were simply not referenced. Apply the same icon to all six Markdown extensions (md, markdown, mmd, mdown, mdtxt, mdtext) to match v0.17.x behavior.
Jocs
pushed a commit
that referenced
this pull request
May 27, 2026
Re-introduce the per-extension `icon: icons/md.ico` mapping in `fileAssociations` so Markdown files use the dedicated document icon (`build/icons/md.ico`) instead of falling back to the application logo. The dedicated icon was lost during the electron-vite refactor in #4001 when each extension was split into its own entry without copying over the original `icon` field. The icon assets are still shipped via `extraResources` (`resources/icons/md.ico` is present in the install), they were simply not referenced. Apply the same icon to all six Markdown extensions (md, markdown, mmd, mdown, mdtxt, mdtext) to match v0.17.x behavior.
5 of 6 tasks
Jocs
added a commit
that referenced
this pull request
Jun 3, 2026
The legacy muya lexer rewrote any nested list whose type differed from its parent (e.g. a ul inside an ol li, or vice versa) into a paragraph, silently dropping the list structure on import. The guard was added in the electron-vite refactor (#4001, commit 85607dd) and is unrelated to sibling mixed lists, which are correctly handled by the in-loop branch at lexer.js:419-453. Remove it so CommonMark-compliant nested mixed lists round-trip and render correctly. Tests: - New vitest spec round-trips ul-in-ol and ol-in-ul and inspects the block tree to assert a nested ul block exists inside the ol li. - New fixture-render Playwright spec loads a mixed-nested fixture and asserts `.editor-component ol li ul li` (and ul li ol li) DOM shape. - The existing `Lists` fixture in test/unit/data/common/Lists.md now separates the deeply-nested ordered sub-list from its sibling text with a blank line, matching the canonical loose-form serialization the exporter produces for a loose-parent context. Fixes #4341 Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
* build: copy static to out and move icons under static; update platform icon paths
* docs: move CN README to docs/ with link to English; reset root README to upstream
* docs: append localized sections (ZH-TW, KO, JA, ES, FR, PT, DE) with fixed links
* build: enable npmRebuild to rebuild native deps (ced) during packaging
* restore build resources from upstream
* chore: remove Playwright (@playwright/test, playwright) from dependencies
* restore .github resources from upstream
* restore .vscode resources from upstream
* i18n: init editor without blocking on language; rely on runtime language-changed update
* chore(renderer): align CSP with upstream (remove unsafe-eval; drop viewport tag)
* i18n: fix empty translation strings in all locale files
- Add translations for themes: cadmiumLight, graphiteLight, materialDark, oneDark, ulyssesLight
- Add translations for paper sizes: A3, A4, A5, Legal, Letter, Tabloid, Liber
- Add translations for image services: GitHub, SM.MS, Imgur, PicGo
- Add translations for diagram types: PlantUML, Mermaid, Vega, KaTeX, MathJax
- Add translations for UI elements: Tweet, OK, HTML
- Add translations for line endings: CRLF, LF
- Add translations for about dialog: title, marktext
- Fix preferences categories and other missing translations
* i18n(zh-TW): fix remaining empty translation strings
- Add PicGo install commands for npm/yarn/pnpm
- Add GitHub token translation
- Add PicGo settings title
- Add delimiter translations for front matter, math, diagrams
- Add code fence translation
* i18n: fix all empty translation strings across locale files
- Fixed 326 empty string values in 8 language files
- Filled with corresponding English translations:
- Theme names (Cadmium Light, One Dark, etc.)
- Paper sizes (A3, A4, A5, Legal, etc.)
- Image services (GitHub, SM.MS, Imgur, PicGo)
- Diagram types (PlantUML, Mermaid, KaTeX)
- UI elements (Zoom, OK, HTML, Tweet)
- Language options in dropdown
- Preferences categories and titles
- Editor settings and commands
- Export and import settings
- Quick insert hints and tooltips
- All locale files now have complete translations without empty values
* fix: 改进 PicGo 检测逻辑,支持生产环境中的常见安装路径
- 在 preload 中增加对 macOS 常见 PicGo 安装路径的直接检查
- 扩展 resolvePicgoBinary 函数的候选路径列表
- 解决生产环境 PATH 环境变量受限导致的检测失败问题
* 移除console日志
* Remove unncessary files
* Removed i18n file validation on startup to improve startup times - smoothen out key search
* Change versions
* Bump electron
* Remove unused stuff in preload
* Change ced to chardet - remove some unuused code
* Revert back to ced cause its faster - finally fix build instructions for windows god damn i hate it
* Tidy up translation - lazy loading of locale files, use common function from preload
* Fix bug when saving un-saved files from the confirmation dialogue
* Remove unnecessart code-fence key
* Fix issue with inserting line breaks using shortcuts - likely caused by Proxy objects due to Pinia reactivity. Switched findIndex to use keys instead of obj references
* Fix task lists
* Fix file drag and drop - File.path is no longer exposed by default in electron v32+
* Update dev instructions
* Improve backspace + enter buttons to be more in line with how vscode md editor works
* Add MIT License to the project
* Tidy up production release + Add translations to 9 languages
* slight readme update
* more readme fixes
* try pinning python to 3.12
* test more
* try again
* t
* edit package.json to include @electron/rebuild
* a
* t
* test
* pls work
* remove fontmanager-redux since it is deprecated
* fix indent
* Fix config
* test
* add token
* fix
* Fix bullet point + task lists behaviour again
* Change version + fix missing locales parameters
* Update locales with missing placeholders
* Fix search folder input styling
* Change parameter substitution to vue-i18n standards
* Update locales, remove .min.json
* ignore .min.json
* ignore minified files
* Change copy-paste to not copy file:// protocol when copying images
* Fix some bugs with image paths when exporting
* Fix bug when zooming
* Fix link bugs
* Fix ipcRenderer.emit calls
* Fix small bug with unloading listenerer
* Fix command palette + focus after open
* Add tar.gz back to linux build targets
* rename to .mjs for support with older node versions
* Fix bug with numbered lists (now behaves similarly to unordered lists)
* Fix pasting of code into codeblocks on windows
* Update auto report template
* a
* Fix image in link rendering error
* Add some fallbacks for preserving this.blocks state in case of an error
* Preserve relative paths of images when copying
* Improve image copying + pasting
* normalise windows paths
* Update to not automatically normalise
* Fix drag and drop images
* Add more safeguards for paths with spaces
* 1 more safeguard
* Ensure nothing is fetched during clean-up
* Fix a bug where blocks is sometimes not the most updated blocks state + fix a bug with cursor position when switching between code editor/WYSIWIG
* Fix blocks saving again - now truly on tab switch ONLY
* Finally fixed blocks - turns out issue was a lack of dispatchChange in cut controller
* Fix duplicate CLOSE_TAB
* Fix null pointer exception in normalizeHeaderText during undo/redo
Fixed issue where undo/redo operations would crash with
"Cannot read properties of null (reading '1')" error.
The bug was in the normalizeHeaderText method which attempted to
access match[1] and match[2] without checking if the regex match
returned null. This could occur during undo/redo operations on
heading blocks in certain edge cases.
Added null check with fallback behavior:
- If regex doesn't match, log a warning and return text as-is
- This prevents the crash while still exporting the content
* Fix auto-normalization on file open that marked files as modified
Fixed a bug where opening a file would immediately mark it as modified,
prompting a save dialog even when no changes were made. The issue had two parts:
1. Added autoNormalizeMarkdownOnOpen preference (defaults to false) to control
whether MarkText automatically normalizes line endings and detects trailing
newlines when files are opened. When disabled, files are preserved as-is.
2. Added isFirstContentChange flag to ignore the initial content change event
triggered by Muya editor normalizing content during file load. This prevents
marking files as unsaved when they haven't been actually edited.
Changes:
- Added autoNormalizeMarkdownOnOpen parameter to loadMarkdownFile
- Modified line ending and trailing newline detection to only run when auto-normalize is enabled
- Added isFirstContentChange flag to file state to track first content change
- Updated content change handler to skip marking file as unsaved on first change
- Added UI toggle in preferences for the new setting
* Updated .gitignore to ignore claude settings file.
* Add i18n localization for autoNormalizeMarkdownOnOpen preference
Added localization strings for the new autoNormalizeMarkdownOnOpen
preference to all supported languages:
- German (de.json)
- Spanish (es.json)
- French (fr.json)
- Japanese (ja.json)
- Korean (ko.json)
- Portuguese (pt.json)
- Simplified Chinese (zh-CN.json)
- Traditional Chinese (zh-TW.json)
The localization describes that this preference controls whether files
are automatically normalized when opened or only when saved.
* Fix subdirectories not rendering in file explorer sidebar
This commit fixes a critical bug where subdirectories were not appearing
in the file explorer sidebar when expanding folders, while files displayed
correctly.
Changes:
- Add missing self-import to treeFolder.vue for recursive rendering
(Vue 3 script setup requires explicit imports including self-references)
- Use local reactive state for isCollapsed to properly track folder
expansion state
- Change v-if to v-show for folder-contents to maintain DOM presence
- Use proper v-for keys based on item IDs instead of array indexes
- Implement alphabetical sorting for folders in addDirectory
- Add event buffering for directory changes before tree initialization
- Extract _processTreeEvent method for cleaner event handling
Root cause: The recursive Folder component was referenced in the template
as <folder> but was never imported in the script setup section, causing
Vue to fail silently when trying to render nested folder components.
Testing: Verified that subdirectories now render correctly when expanding
folders in the sidebar, while maintaining proper file display and folder
state persistence.
* Added some padding below the <ul> element when rendering markdown.
* Added a small debounce for search to avoid extreme lag
* Add back hacky fix for PDF image links
* refactor(theme): replace auto-switch dropdown with follow system theme toggle
Replace the "Auto switch theme" enum dropdown with a simpler "Follow system theme"
boolean toggle and fix runtime theme switching bug.
BREAKING CHANGE: `autoSwitchTheme` preference replaced with `followSystemTheme`.
Old settings are automatically migrated (0 → true, 2 → false).
Changes:
- Replace dropdown UI with toggle switch (Bool component)
- Rename autoSwitchTheme → followSystemTheme (enum → boolean)
- Fix runtime switching: set nativeTheme.themeSource = 'system'
- Add nativeTheme.on('updated') listener for theme change detection
- Add migration logic for existing users
- Update all 9 locale files with new translation keys (claude ai translation, needs confirmation)
Benefits:
- Runtime theme switching works without restart
- Clearer UX
Files changed: 15 files (8 core + 7 locales)
Tested on: Linux/Arch (Niri/Wayland), Windows 11, Node.js 22.19.0
* fix(theme): prevent white flash and apply followSystemTheme immediately
Fix two issues with the followSystemTheme feature:
1. White flash on startup: Wait for nativeTheme.shouldUseDarkColors to
settle before creating windows (with 150ms timeout fallback for cases
where 'updated' event doesn't fire).
2. Toggle takes effect immediately: Apply system theme when user enables
followSystemTheme without requiring restart.
Changes:
- Delay window creation when followSystemTheme enabled until theme is ready
- Apply system theme immediately when followSystemTheme toggled on
NOTE: Reading the Electron theme documentation, I can not find a
better way of preventing the "white flash", but I very well could be
missing something. Personally, I do not see/feel any delay, and I would
prefer an imperceptible delay if it prevents a white flash bomb.
Tested on: Linux/Arch (Niri/Wayland)
* Fix header and footer styles when exporting
* feat(theme): add separate light/dark mode theme selection
Allow users to select different themes for light and dark system modes.
When "Use separate theme in dark mode" is enabled, users can choose any
theme for light mode (e.g., Graphite) and any theme for dark mode (e.g.,
Material Dark). Themes switch automatically when system theme changes.
Changes:
- Add lightModeTheme and darkModeTheme preferences with dropdown selectors
- Apply theme changes immediately when preferences are toggled or changed
- Fix theme card overflow by using outline instead of border, hmm.
- Update 9 translation files (de, en, es, fr, ja, ko, pt, zh-CN, zh-TW)
Files changed: 15 (schema, preferences, app logic, Vue components, store, translations)
Tested on: Linux/Arch (Niri/Wayland)
* Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
* fix: address code review feedback
- Prevent duplicate listener registration: Add flag to register nativeTheme
listener only once (prevents multiple registrations on macOS)
- Remove unused isDarkMode variable (updated but never read)
- createWindow: Declare once outside if/else to avoid duplication
- Optimize condition ordering: Check followSystemTheme before theme changes
(short-circuit optimization)
- Platform-specific startup delay: Change from followSystemTheme check to
isLinux check (white flash only occurs on Linux regardless of setting)
- Generate theme dropdown options from config to avoid duplication
- Update translations: Change to "Follow System Theme" for clarity
- Remove duplicate customCss key in translation files
- Remove config migration code, sane defaults suffice.
- Change default: Set followSystemTheme to true (existing cleanup code
handles removal of deprecated autoSwitchTheme setting)
Files changed: 3 core files, 9 locale files, 1 static config
* config defaults: make followSystemTheme default
* Fix bug bullet point bug - a detached pointer that forms its own list joins the list it detached from when tabbed (caused by improper preSibiling setting)
* Fix ordering of child bullet lists when un-indented
* Prevents nested lists from being created in 1 another (ordered list in bullet list, bullet list in ordered list)
* Edit lexer to prevent parsing of nested lists of different types
* Fix searching reactivity: Now assigns a brand new object to correctly trigger state changes with Pinia
* Fix bugs with "del" when deleting above a list
* A few more edge cases where bullet points can get re-ordered unexpectedly
* Widen regex in normalizeHeaderText to match updateAtxHeader regex
* Handle feedback
* remove un-used var
* Fix context-menu (right-click)
* Fix spellcheck to allow any system installed spellchecker language
* bump electron + fix missing call to spellcheck switchLanguage
* Bump deps
* Update AUR image with link
* Upgrade some dependencies to allow building and packaging on Fedora
Signed-off-by: ffgan <[email protected]>
* deprecate externalizeDepsPlugin
Signed-off-by: ffgan <[email protected]>
* Attempt to add support for ubuntu-22.04
* Fix release
* remove gcc13 requirement
* More testing/comments
* change ver number
* Fixed translations for word/char/para counters
* Add file associations for macOS
Register MarkText as a handler for markdown files (.md, .markdown,
.mmd, .mdown, .mdtxt, .mdtext) and plain text (.txt) on macOS.
This allows users to set MarkText as the default app for opening
markdown files via Finder's "Open With" menu.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Add 27 popular color themes from gogh-themes
Adds the following themes with full UI styling and Prism.js syntax highlighting:
Dark themes:
- Ayu Dark, Ayu Mirage, Catppuccin Mocha, Cyberdream, Dracula
- Everforest Dark, Gruvbox Dark, Horizon Dark, Kanagawa, Monokai Pro
- Nightfox, Nord, Oxocarbon Dark, Palenight, Rosé Pine, Rosé Pine Moon
- Solarized Dark, Synthwave 84, Tokyo Night, Tokyo Night Storm
Light themes:
- Ayu Light, Catppuccin Latte, Everforest Light, Gruvbox Light
- Rosé Pine Dawn, Solarized Light, Tokyo Night Light
Each theme includes:
- Complete CSS variables for editor, sidebar, and UI elements
- Prism.js syntax highlighting theme
- Menu integration and preferences panel support
- Translations for 9 languages
Theme colors sourced from gogh-themes (MIT License) and official theme repositories.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix pasting to search text
* Fix marktext#54 - Inserted cursor signature (at the front of markdown elements) messes with markdown parsing when converting from sourceCode mode to normal mode
* Try out automatic pre-releases
* Fix: handle CodeMirror race condition error gracefully
Add defensive handling for a known CodeMirror 5 race condition that
causes "Cannot read properties of undefined (reading 'map')" errors
when clicking in the source code editor during rapid state changes.
Changes:
- Add null check in adjustCursor() for when cm.getLine() returns null
- Add isCodeMirrorRaceCondition() to detect and suppress non-fatal
CodeMirror errors instead of showing an error dialog
This is a known Vue/CodeMirror 5 compatibility issue where Vue's
reactive proxy system can interfere with CodeMirror's internal
line measurement data structures.
See: codemirror/codemirror5#6886
* Remove unnecessary static files
* Fixes marktext#57 - Proper handling of links according to CommonMark spec
* Fix theme images on README
* Restore dark theme to original marktext dark
* Fix image selector input being constant throughout different images
* Improve image path auto-complete - now lists all items in a directory
* Fix issue where typing in editor is blocked if a tool (image picker, formatting) was not deleted properly due to storing of Proxy objects instead of the raw objects themselves
* comments
* Work on feedback
* Try out all-contributors
* Revert "Try out all-contributors"
This reverts commit 612e121.
* Add contrib.rocks instead
* Re-write branch to be about enabling/disabling autoNormalisation of line endings on open. Also fixes preference saving issues
* Remove unnecessary assert error - we now want to allow explicit normalisation
* Re-factor saving system to prevent false unsaved detections
Marktext traditionally relied on comparing the current content with the
last saved content to determine if there were unsaved changes.
However, this meant that any formatting differences between the original
file and MarkText's output will lead to false positives.
This commit introduces tracking of the unsaved state purely based on the
existing history stack instead. Comparing save states using history
record IDs.
* Edit readme
* Edit linux_dev
* (fix)image/uploader:
Custom cliScript configuration bugs
* Fix bug with saving system not updating lastSavedId
* Fix a bug where indenting a list does not correctly impart the listType, leading to "turnInto" failing
* - Fix regression for HTML clipboard data not being parsed
- Swapped default copy method to copyAsMarkdown and instead provide a copy as rich text option
* Fix Ctrl+Shift+C default mapping
* fix some typos
* Add support for performance benchmarking
* Optimise getCommandsWithDescription: Shaved 40ms~ off initial render time
* Remove setTimeout from commandCenter
* ver change
* Remove un-used package + handle errors gracefully
* rm console.logs
* Improve scrolling behaviour for math blocks. Fixes marktext#73
* Revise MacOS release notes for notarization issues
Updated MacOS release note to reflect new warning message and provided commands for users.
* Clarify MacOS release instructions
Updated instructions for MacOS users regarding notarization.
* Rm console.log, fix some styling
* Add Open Last Folder Feature. Fixes marktext#30
* Fix some default values
* Add some guardclauses. This prevents a case where the cursor points to an invalid block which does not exist, causing a crash when switching tabs. Still not too sure why the cursor is like that in the 1st place
* Fix search enter key regression
* Fixes marktext#51 - Opening the same file when it is already open causes duplicate watchers to be attached. This led to the watchers detecting the file was modified by "another process", and when reloading, causes a loss of state.
Modified to prevent this and switch to that tab when you open a file that is already opened
* Improve pasting to handle carriage returns \r + Fix a bug with pasting multi-line text into headings
* Fixes a race condition when saving blocks/cursor state when which leads to intermittent crashes when switching tabs
* Improve performance of scrolling by a bit - fixes debounce onScroll
* Several fixes for tables:
- Fixes a crash with single row tables
- Fixed a bug where Remove Column fails to work for a table with 2 columns
* Remove duplicate motivation line from README
Removed redundant line about motivation from README.
* Fix marktext#74 - Crash occurs when history stack is empty but save command is pressed
* Fix marktext#75 - Cursor position is incorrectly set when using multi-line paragraphs and trying to create a header (Shift+Enter)
* Fixes marktext#40 - Implement option to restore previous layout
* fix styling for search
* Fix some regressions
* Remove "MarkText" watermark from pdf title
* Additional safeguards
* Add even more safe-guards to fix marktext#90
* Add follow system theme logic to menu as well
* Add safeguards to .scrollTop paths
* Fix crash when switching tabs in sourceCode mode
* Fix search in Linux
* Fix marktext#95 - lastEditIndex was not properly restored when switching between sourceCodeMode and normal mode
* Rm logs
* Fix marktext#92 - Quick Insert tool incorrectly uses the modified options list instead of the original when filtering
* Version jump to avoid confusion
* upgrade electron to v41.2.1
Signed-off-by: ffgan <[email protected]>
* Update developer docs
* Upgrade electron-builder and vue as well
* Added migrations for old startUpAction enum - Fixes marktext#97
* Fix marktext#98 - Race conditions in updating tabIndexToId mapping
* Update mac instructions
* Fix: remove hidden directory filter to allow .pi and similar dirs to display markdown files
* Add seperate MacOS runners for x64 buiilds - Fixes marktext#84 | Based off marktext-plus' implementation
* Buffer-saving init
* Add update & restore logic
Co-authored-by: Copilot <[email protected]>
* Working restore
* Lots of fixes
* Race condition improvements
* Bug fix with Muya handling of restoring cursor position for a "\n" markdown file + Streamline some logic
* Fix state restore bug - Pina deep copies object-style $patch whichc causes currentFile and tabs to become mis-aligned
* A few more bug fixes
Co-authored-by: Copilot <[email protected]>
* Fix UUID overriding
Co-authored-by: Copilot <[email protected]>
* Fix bug where u can undo the restored state itself
Co-authored-by: Copilot <[email protected]>
* Fixed major bug with restoreAll overriding "Open with...", double click to open etc
Co-authored-by: Copilot <[email protected]>
* Fix bug where empty restore state cause a crash (no currentFIle)
* Clear buffers on non restore state opening to avoid windows growing
* Add logic to handle files that have been deleted when restoring state
* Fix horizontal scrollbar on math blocks when there is no overflow
* Fix bring window to front upon opening a file in windows
* Add safeguards for marktext#109
* Optimise relative images pasting - now written straight to the relative folder + Fix marktext#106
* Clean up Linux installation instructions
Removed Flatpak install instructions, as they point to the original release, not this fork of Marktext
Updated Arch User Repository installation instructions to point to this fork of Marktext
Added disclaimer about the AUR package not being maintained by the maintainer of this repository, so it may be out of date.
Updated links to point to the correct releases page for this repository
Updated list of dependencies for AUR package installation.
* Fixes marktext#110 - HTML tables should not trigger default table actions and cause a crash
* Fix marktext#114 - Cursor on black lines in source code mode will send the cursor back to the top when switching back to normal mode
* Revert links and cleanup README
* a
* Address PR feedback: remove fork references, restore upstream files
- Remove all 'tkaixiang' fork references from README, package.json, about dialog, and docs
- Restore original LICENSE (Luo Ran / MarkText Contributors)
- Restore .github/ISSUE_TEMPLATE files (bug_report, feature_request, question) and ISSUE_TEMPLATE.md
* Align i18n READMEs with English version
- Add translation links nav at top of each i18n README
- Remove fork-specific motivation/narrative paragraphs
- Update themes section with full 33-theme list and link to docs/THEMES.md
- Replace Motivation section with Contributors (contrib.rocks image), help, and project setup sections
* Address PR marktext#4001 review feedback
- globalSetting: use app.getAppPath() instead of process.cwd() for __static
in development so the path is anchored to the app rather than the launch
directory.
- electron-builder: restore appId to com.github.marktext.marktext (the
template default com.electron.app would collide with other apps and
break auto-updates / macOS Keychain entries for existing users).
- i18n.getTranslation: stop reassigning the outer `key` parameter in the
lookup loop; the fallback `return key` now returns the original full
key instead of the last-iterated segment.
- app._initializeLanguage: replace console.log/error with electron-log so
language-init diagnostics land in the same log stream as the rest of
the main process.
* i18n: hoist null check out of the lookup loop
The previous guard ran on every iteration even though `probe` only
becomes nullish when `loadTranslations` returns null at the very
start. Check that once up front instead.
* remove redundant nodeIntegration
---------
Signed-off-by: ffgan <[email protected]>
Co-authored-by: BoHu <[email protected]>
Co-authored-by: Michael Joseph <[email protected]>
Co-authored-by: vredesbyyrd <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: ffgan <[email protected]>
Co-authored-by: Michael Sakaluk <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: April <[email protected]>
Co-authored-by: Galileo Lion <[email protected]>
Co-authored-by: Ke <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: TK <[email protected]>
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
…vite refactor) (marktext#4196) * fix: restore docs accidentally deleted in PR marktext#4001 (electron-vite refactor) Restore 7 files that were unintentionally removed during the electron-vite refactoring, which had no functional relation to the build system changes: - .github/CHANGELOG.md (858 lines, project history) - .github/CODE_OF_CONDUCT.md (74 lines, community guidelines) - .github/PULL_REQUEST_TEMPLATE.md (16 lines, PR template) - CONTRIBUTING.md (92 lines, contribution guide) - docs/README.md (29 lines, user docs index) - docs/dev/RELEASE_HOTFIX.md (14 lines, hotfix release process) - docs/i18n/tr.md (265 lines, Turkish README, had no replacement) Not restored: old i18n files replaced by renamed equivalents (README-fr.md etc.), docs/i18n/pl.md (self-described as outdated since 2018), and test data .md files whose entire test infrastructure was intentionally removed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(docs): move user documentation into docs/end-user/ Move all 20 end-user-facing markdown files from docs/ into the new docs/end-user/ subdirectory to separate them from developer docs, i18n files, and static assets. Update all affected links: - docs/README.md: all local doc links now prefixed with end-user/ - docs/end-user/{BASICS,EDITING,EXPORT,SPELLING}.md: assets/ → ../assets/ - docs/end-user/THEMES.md: themeImages/ → ../themeImages/ - docs/i18n/README-{de,es,fr,jp,kr,pt,zh_cn,zh_tw}.md: ../THEMES.md → ../end-user/THEMES.md - docs/i18n/tr.md: ../LINUX.md → ../end-user/LINUX.md - docs/i18n/ar.md: ../../docs/LINUX.md → ../../docs/end-user/LINUX.md - README.md: docs/THEMES.md → docs/end-user/THEMES.md Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore(github): modernize issue and PR templates Issue templates: - Remove legacy single-file ISSUE_TEMPLATE.md (superseded by directory) - Replace bug_report.md with structured Issue Form (bug_report.yml): required fields, OS dropdown, version inputs, reproducibility checkbox, auto-labels: bug + triage - Improve feature_request.md: add title prefix "[Feature] ", label "enhancement", restructure sections (Summary / Problem / Proposed solution / Alternatives / Context) - Remove question.md; questions now routed to GitHub Discussions - Add config.yml: blank_issues_enabled=false, contact_links to Discussions and Documentation PR template: - Replace Q&A table with "Closes #" link + type checklist + test plan - Add "Notes for reviewers" section - Retain MIT license acknowledgement Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(docs): reorganize CODE_OF_CONDUCT, CHANGELOG and consolidate images Move files: - .github/CODE_OF_CONDUCT.md → docs/dev/CODE_OF_CONDUCT.md - .github/CHANGELOG.md → docs/CHANGELOG.md - docs/{brew-cask.gif,doutu.jpg,focus.gif,marktext.png,source.gif,typewriter.gif} → docs/assets/ - docs/dev/assets/marktext-interface.png → docs/assets/ Update all affected references (13 files): - README.md: 4 image paths - docs/i18n/README-{de,es,fr,jp,kr,pt,zh_cn,zh_tw}.md: 4 image paths each - docs/i18n/tr.md: 4 image paths + CHANGELOG link - docs/i18n/ar.md: 4 image paths + CHANGELOG link - docs/dev/INTERFACE.md: marktext-interface.png path - CONTRIBUTING.md: CODE_OF_CONDUCT.md link Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * revert: restore root README.md to master branch version Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: correct broken links in README.md * chore: miscellaneous file reorganization - Move CONTRIBUTING.md → .github/CONTRIBUTING.md - Rename docs/i18n/ar.md → docs/i18n/README-ar.md - Rename docs/i18n/tr.md → docs/i18n/README-tr.md - Remove docs/sponsor/ images (qordoba.png, readme.png) - Update docs/end-user/BASICS.md and LINUX.md Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: restore .github/FUNDING.yml from master Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(i18n): re-translate all README files from root README.md source * chore: misc dev docs and config updates - Update .vscode/settings.json - Update docs/dev/ARCHITECTURE.md - Move docs/dev/code/IPC.md → docs/dev/IPC.md - Remove docs/dev/code/ directory (BLOCK_ADDITION_PROPERTY.md, COMMANDS.md, IPC.md, README.md, renderer/editor.md) - Remove docs/i18n-validation.md - Update package.json Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
…rktext#4197) * restore: recover accidentally deleted tests from PR marktext#4001 (electron-vite refactor) Restores test infrastructure lost in the webpack→electron-vite migration: Unit tests restored (all passing): - test/unit/specs/extract-word.spec.js (33 cases, spellchecker) - test/unit/specs/markdown-footnotes.spec.js (lexer footnote parsing) - test/unit/specs/markdown-list-indentation.spec.js (list indent variants) - test/unit/specs/match-electron-accelerator.spec.js (keybinding) - test/unit/specs/markdown-basic.spec.js (Muya ContentState round-trip) - test/unit/data/ (13 markdown fixture files) - test/unit/markdown.js (fixture loader helper) E2E tests restored (require `npm run build` + Playwright, run via test:e2e): - test/e2e/{launch,xss}.spec.js + helpers.js (helpers.js: updated mainEntrypoint from dist/electron/main.js → out/main/index.js for electron-vite output) Not restored (reason): - test/unit/karma.conf.js obsolete (Karma replaced by Vitest) - test/unit/index.js obsolete (webpack require.context) - test/unit/specs/LandingPage* disabled before refactor; component removed - test/specs/commonMark/run.spec.js one-time network utility, not a unit test - test/specs/gfm/run.spec.js same Bug fixes required to make tests pass: - slugger.js: strip HTML tags and LATIN_SYMBOLS_MAP chars ($%&<>|'") BEFORE calling downcode(), preventing e.g. '<b>' → 'lessbgreater' and '$%&' → 'dollarpercentand' which then bypass the special-char removal regex. - test/unit/data/common/Lists.md: update tight mixed-ordered/unordered nested list to its stable idempotent form (loose outer list). The lexer's trailing-\n heuristic for loose detection produces a false positive when a sub-list ends with \n, causing tight→loose→all-loose cascading over multiple round-trips; the fixture is updated to the stable state so the round-trip test is valid. Test runner setup: - vitest.config.js: new config (jsdom env, path aliases matching electron.vite.config.js, globals:true for Chai-style expect) - package.json: add test / test:unit / test:e2e scripts Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(e2e): fix E2E test helpers so app launches and tests pass - Pass project root as Electron entry (not the main script file) so app.getAppPath() returns the project root and __static resolves to static/ correctly; passing out/main/index.js directly bypasses package.json and breaks preference/locale loading - Set PERF_TESTING=true so locale loader uses process.cwd() path - Run minify-locales to create required *.min.json locale files - Rebuild native modules with CXXFLAGS=-std=c++20 (Electron 41 headers require C++20) - Add unique suffix to temp dir to prevent SingletonLock collisions when tests run in parallel - Use direct Electron binary path (via path.txt) instead of Node wrapper - Add @playwright/test to devDependencies Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore: add test-results/ and playwright-report/ to .gitignore Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: address Copilot review comments on tests and slugger Functional fixes: - extract-word.spec.js: replace broken conditional helper with proper assertions (null check + deep.equal); remove stray console.log - slugger.js: include '|' in pre-downcode symbol removal; downcode() maps '|' to "or" which survived the special-char regex, same class of bug as the previously fixed $%&<> - markdown-list-indentation.spec.js: fix option key typo listIdentation → listIndentation so ContentState is created with the intended setting, not always the default - launch.spec.js / xss.spec.js: remove async from test.describe() callbacks; Playwright requires describe callbacks to be synchronous - playwright.config.js: change headless: false → true so E2E tests can run in CI/headless environments without hanging Typo/formatting fixes: - match-electron-accelerator.spec.js: "non characte key" → "non-character key", "Emtpy" → "Empty" - markdown-footnotes.spec.js: "footenote" → "footnote" - markdown-list-indentation.spec.js: describe text "identation" → "indentation" - markdown.js: add missing space before = in BlockquotesTemplate export - BasicTextFormatting.md: "extentions" → "extensions" Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
…arktext#4001) ## Data-Loss / Critical Bugs Fixed - Fix autosave toggle inverted logic (!!value → !value) causing toggle to never work - Fix undo() crash when history index is 0 (accessing stack[-1]) - Fix sendSync against async IPC handler for image picker (convert to invoke/handle) ## Editor Experience / Functionality Regressions Fixed - Fix Muya destroy() crash if plugins not registered (add optional chaining) - Fix once event listeners: array mutated during forEach iteration - Fix selection/dom.js traverseUp guard (no check for false return value) ## Memory Leaks / Resource Cleanup Fixed - Fix MutationObserver never disconnected (store on instance, disconnect in destroy) - Fix historyTimer not cancelled in clear() (fires after editor destruction) - Fix renderCodeBlockTimer module-level shared state (move to instance property) - Fix editor component event listeners cleanup (add missing off() calls for 4 Muya events + bus event) ## Architecture / Quality Fixes - Remove unused main_renderer alias from electron.vite.config.js - Fix inconsistent common/i18n imports (use alias instead of relative paths) - Update BUILD.md: Node.js version (>=20.19.0), package manager (npm), build output (dist) These fixes address high-risk regressions and prevent data loss, resource leaks, and silent failures. Co-Authored-By: Claude Haiku 4.5 <[email protected]>
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
…ktext#4226) languine was added to `dependencies` in the electron-vite refactor (marktext#4001) but is never imported, has no config file, and is not referenced in any scripts. Removing it eliminates the transitive [email protected] dependency that triggered Dependabot alert marktext#409 (GHSA-gh4j-gqv2-49f6, medium severity, XML comment/CDATA injection in XMLBuilder). Co-authored-by: Claude Sonnet 4.6 <[email protected]>
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
Re-introduce the per-extension `icon: icons/md.ico` mapping in `fileAssociations` so Markdown files use the dedicated document icon (`build/icons/md.ico`) instead of falling back to the application logo. The dedicated icon was lost during the electron-vite refactor in marktext#4001 when each extension was split into its own entry without copying over the original `icon` field. The icon assets are still shipped via `extraResources` (`resources/icons/md.ico` is present in the install), they were simply not referenced. Apply the same icon to all six Markdown extensions (md, markdown, mmd, mdown, mdtxt, mdtext) to match v0.17.x behavior.
thimbleberrysystems
pushed a commit
to thimbleberrysystems/WordBird
that referenced
this pull request
Jun 21, 2026
The legacy muya lexer rewrote any nested list whose type differed from its parent (e.g. a ul inside an ol li, or vice versa) into a paragraph, silently dropping the list structure on import. The guard was added in the electron-vite refactor (marktext#4001, commit 5729066) and is unrelated to sibling mixed lists, which are correctly handled by the in-loop branch at lexer.js:419-453. Remove it so CommonMark-compliant nested mixed lists round-trip and render correctly. Tests: - New vitest spec round-trips ul-in-ol and ol-in-ul and inspects the block tree to assert a nested ul block exists inside the ol li. - New fixture-render Playwright spec loads a mixed-nested fixture and asserts `.editor-component ol li ul li` (and ul li ol li) DOM shape. - The existing `Lists` fixture in test/unit/data/common/Lists.md now separates the deeply-nested ordered sub-list from its sibling text with a blank line, matching the canonical loose-form serialization the exporter produces for a loose-parent context. Fixes marktext#4341 Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Jun 22, 2026
This was referenced Sep 19, 2026
Jocs
added a commit
that referenced
this pull request
Sep 19, 2026
…r tree (#5159) Any non-empty `treePathExcludePatterns` emptied the sidebar project tree. `common/filesystem/paths.ts` imports `{ minimatch } from 'minimatch'`, but minimatch was never declared as a dependency. With `shamefully-hoist=true` it resolved to whichever transitive copy landed in the root node_modules — minimatch@3, whose CommonJS export is the function itself and carries no named `minimatch` export. So the imported binding was `undefined`. `src/types/shims.d.ts` hand-declared `export function minimatch(...)` for the module, which is why typecheck and lint stayed green over a binding that could never exist at runtime. `checkPathExcludePattern` only reaches the call inside the pattern loop, so an empty array worked and any non-empty one threw `TypeError: minimatch is not a function`. The watcher calls it from chokidar's `ignored` predicate, where the throw aborts the initial traversal: chokidar emits `error` instead of the `addDir`/`add` events the renderer builds the tree from, leaving the sidebar empty. Declare minimatch as a real dependency and drop the shim so the module's own types apply. Path exclusion now works as documented — it had been inert since #4001 introduced the import. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Jocs
added a commit
that referenced
this pull request
Sep 19, 2026
…r tree (#5159) (#5461) Any non-empty `treePathExcludePatterns` emptied the sidebar project tree. `common/filesystem/paths.ts` imports `{ minimatch } from 'minimatch'`, but minimatch was never declared as a dependency. With `shamefully-hoist=true` it resolved to whichever transitive copy landed in the root node_modules — minimatch@3, whose CommonJS export is the function itself and carries no named `minimatch` export. So the imported binding was `undefined`. `src/types/shims.d.ts` hand-declared `export function minimatch(...)` for the module, which is why typecheck and lint stayed green over a binding that could never exist at runtime. `checkPathExcludePattern` only reaches the call inside the pattern loop, so an empty array worked and any non-empty one threw `TypeError: minimatch is not a function`. The watcher calls it from chokidar's `ignored` predicate, where the throw aborts the initial traversal: chokidar emits `error` instead of the `addDir`/`add` events the renderer builds the tree from, leaving the sidebar empty. Declare minimatch as a real dependency and drop the shim so the module's own types apply. Path exclusion now works as documented — it had been inert since #4001 introduced the import. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Sep 20, 2026
VictorVow
added a commit
to VictorVow/marktext
that referenced
this pull request
Oct 5, 2026
…switches The Files tree is rendered under v-if, so switching the sidebar to Table of Contents or Search destroys every treeFolder and recreates it on the way back. Each treeFolder kept isCollapsed in a local ref seeded from the tree node and never wrote it back, so every folder reset to collapsed. This regressed in the electron-vite rewrite (marktext#4001). Make isCollapsed a writable computed over the tree node, writing through a new SET_FOLDER_COLLAPSED project store action, so the state lives on the tree data and survives the remount. treeCtrl mutates folder nodes in place, so file-watcher updates keep it too; opening a new project root still starts fully collapsed. Add an Electron e2e regression test that expands nested folders, switches to TOC and back, and asserts they are still expanded.
3 of 6 tasks
Jocs
pushed a commit
to VictorVow/marktext
that referenced
this pull request
Oct 8, 2026
…switches The Files tree is rendered under v-if, so switching the sidebar to Table of Contents or Search destroys every treeFolder and recreates it on the way back. Each treeFolder kept isCollapsed in a local ref seeded from the tree node and never wrote it back, so every folder reset to collapsed. This regressed in the electron-vite rewrite (marktext#4001). Make isCollapsed a writable computed over the tree node, writing through a new SET_FOLDER_COLLAPSED project store action, so the state lives on the tree data and survives the remount. treeCtrl mutates folder nodes in place, so file-watcher updates keep it too; opening a new project root still starts fully collapsed. Add an Electron e2e regression test that expands nested folders, switches to TOC and back, and asserts they are still expanded.
Jocs
pushed a commit
that referenced
this pull request
Oct 8, 2026
…#5632) The Files tree is rendered under v-if, so switching the sidebar to Table of Contents or Search destroys every treeFolder and recreates it on the way back. Each treeFolder kept isCollapsed in a local ref seeded from the tree node and never wrote it back, so every folder reset to collapsed. This regressed in the electron-vite rewrite (#4001). Make isCollapsed a writable computed over the tree node, writing through a new SET_FOLDER_COLLAPSED project store action, so the state lives on the tree data and survives the remount. treeCtrl mutates folder nodes in place, so file-watcher updates keep it too; opening a new project root still starts fully collapsed. Add an Electron e2e regression test that expands nested folders, switches to TOC and back, and asserts they are still expanded.
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.
Description