Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .tid file extension in node.js for text/vnd.tiddlywiki-multiple #8409

Conversation

btheado
Copy link
Contributor

@btheado btheado commented Jul 23, 2024

As mentioned in the discussion of #8406, editing text/vnd.tiddlywiki-multiple tiddlers in node.js causes the the files .tid extension to be removed and an extra .meta file to be created.

This PR fixes the issue by treating text/vnd.tiddlywiki-multiple the same as text/vnd.tiddlywiki and tiddler.hasField("_canonical_uri") when determining the file extension.

Copy link

vercel bot commented Jul 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Jul 23, 2024 1:55am

Copy link

Confirmed: btheado has already signed the Contributor License Agreement (see contributing.md)

@btheado
Copy link
Contributor Author

btheado commented Jul 23, 2024

I tested editing existing tiddlers with the following characteristics:

  1. type == text/vnd.tiddlywiki
  2. type == text/vnd.tiddlywiki-multiple
  3. tiddler.hasField("_canonical_uri")
  4. type == image/jpeg

In the first 3 cases, the tiddler was saved with .tid extension. In the 4th case it was saved as a .meta file and a file without extension.

@Jermolene
Copy link
Member

Thanks @btheado I think that's a reasonable fix.

@Jermolene Jermolene merged commit b8ed59f into TiddlyWiki:master Jul 23, 2024
5 checks passed
tsukasa-au pushed a commit to tsukasa-au/TiddlyWiki5 that referenced this pull request Aug 3, 2024
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