Repository navigation
fix(xmind): open maps saved with XMind 2020 and later - #423
Merged
Merged
Conversation
XMind 2020 and later (XMind Zen) store the map in content.json and only write a map with a warning message to content.xml, which was all that got shown. Read content.json when the file has one, with the same titles, priority and progress markers, links and child topics as before. Fixes #164 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 task done
1 task done
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.
Fixes #164
XMind 2020 and later (XMind Zen) store the map in
content.json. They still write acontent.xml, but it only holds a placeholder map with a warning that the file cannot be opened normally. The XMind plugin only readcontent.xml, so that warning was all users saw. The comment saying #164 was fixed since 0.0.29 most likely came from testing XMind 8 files, which only havecontent.xml.readDocument()now readscontent.jsonwhen the file has one and falls back tocontent.xmlotherwise. The newprocessJsonTopic()takes over the same things as the XML path: titles, priority and progress markers, links, and attached child topics. Floating (detached) topics are left out, because the editor allows only one root.Tested: Vitest cases for
processJsonTopic(), and areadDocument()case with a zip that has bothcontent.jsonand the warning map incontent.xml. Vitest, ESLint and the build pass. I have not yet opened a real XMind 2020+ file in a running Nextcloud.A backport to
stable-0.1follows.🤖 AI (if applicable)