Skip to content

Add @fxha to contributors - #75

Merged
Jocs merged 1 commit into
marktext:masterfrom
fxha:fxha
Mar 24, 2018
Merged

Jocs merged 1 commit into
marktext:masterfrom
fxha:fxha

Conversation

@fxha

@fxha fxha commented Mar 24, 2018

Copy link
Copy Markdown
Contributor

No description provided.

@Jocs
Jocs merged commit 98280ab into marktext:master Mar 24, 2018
@fxha
fxha deleted the fxha branch March 26, 2018 16:38
Jocs pushed a commit that referenced this pull request May 13, 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 #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 #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 #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 #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 #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 #74 - Crash occurs when history stack is empty but save command is pressed

* Fix #75 - Cursor position is incorrectly set when using multi-line paragraphs and trying to create a header (Shift+Enter)

* Fixes #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 #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 #95 - lastEditIndex was not properly restored when switching between sourceCodeMode and normal mode

* Rm logs

* Fix #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 #97

* Fix #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 #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 #109

* Optimise relative images pasting - now written straight to the relative folder + Fix #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 #110 - HTML tables should not trigger default table actions and cause a crash

* Fix #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 #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
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants