Repository navigation
fix: register markdown MIME types in desktop file - #691
Merged
deepin-bot[bot] merged 1 commit intoOct 26, 2026
Merged
Conversation
1. Add text/markdown and text/x-markdown to the MimeType field 2. .md files are detected as text/markdown instead of text/plain 3. Text Editor was missing from the "Open With" menu for .md files Log: Text Editor now shows up in the "Open With" menu for .md files Influence: 1. Right-click a .md file and check Text Editor appears in Open With 2. Set Text Editor as the default app for .md and verify it opens fine 3. Right-click a .txt file and confirm Text Editor still appears fix: 桌面文件注册 markdown MIME 类型 1. MimeType 字段添加 text/markdown 与 text/x-markdown 2. .md 文件被识别为 text/markdown 而非 text/plain 3. 修复 .md 文件打开方式菜单缺少文本编辑器的问题 Log: .md 文件的"打开方式"菜单中可以看到文本编辑器 Influence: 1. 右键 .md 文件,检查打开方式菜单中出现文本编辑器 2. 将文本编辑器设为 .md 默认打开方式,验证可正常打开 3. 右键 .txt 文件,确认文本编辑器仍出现在打开方式菜单中 PMS: TASK-396619
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the desktop entry’s MimeType field to include both standard and legacy Markdown MIME types, allowing file managers and GIO to recommend Text Editor for .md files. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例# 无需修改,当前变更已正确实现 Markdown MIME 类型注册
# deepin-editor.desktop MimeType 字段已包含:
# text/markdown;text/x-markdown;
# 该写法符合 freedesktop.org Desktop Entry 规范本报告由 AI 代码审查工具自动生成 |
lzwind
approved these changes
Oct 26, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/merge |
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.
Summary
Add
text/markdownandtext/x-markdownto theMimeTypefield ofdeepin-editor.desktop, so Text Editor appears in the "Open With" menu for.mdfiles.Problem
On current bases shared-mime-info detects
.mdfiles astext/markdown(a subtype oftext/plain). The desktop file never declared this type, and the file-manager "Open With" list is built by exact MIME-type matching, so Text Editor was missing from the menu for.mdfiles while it still appeared for.txt.text/x-markdownis declared as well for compatibility with older bases where.mdresolves to that type.Changes
deepin-editor.desktop: appendtext/markdown;text/x-markdown;toMimeTypeTesting
desktop-file-validatepassesmimeinfo.cache):gio mime text/markdownnow lists deepin-editor in recommended apps (before the fix only Typora was listed).mdfiles in the file managerPMS: TASK-396619
Summary by Sourcery
New Features: