Skip to content

Commit bdaa2af

Browse files
ec1oudtballison
authored andcommitted
[TIKA-4724] Use IANA-registered text/markdown as primary type (#2806)
text/markdown has been the IANA-registered media type for Markdown since RFC 7763 (March 2016). freedesktop's shared-mime-info has used it as the primary type for years, with text/x-markdown as an alias. Consumers that fall back to Tika's bundled database when no system shared-mime-info is installed (e.g. Qt on macOS and Windows) cannot currently resolve text/markdown and silently drop the type from filter lists. Promote text/markdown to the primary type and keep Tika's historical text/x-web-markdown together with freedesktop's text/x-markdown as aliases, so existing lookups continue to resolve. Update the comment to match freedesktop's wording. Generated-by: Claude Opus 4.7 (claude-opus-4-7) (cherry picked from commit c297247)
1 parent a475be6 commit bdaa2af

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8533,8 +8533,10 @@
85338533
<sub-class-of type="text/plain"/>
85348534
</mime-type>
85358535

8536-
<mime-type type="text/x-web-markdown">
8537-
<_comment>Markdown source code</_comment>
8536+
<mime-type type="text/markdown">
8537+
<_comment>Markdown document</_comment>
8538+
<alias type="text/x-web-markdown"/>
8539+
<alias type="text/x-markdown"/>
85388540
<glob pattern="*.md"/>
85398541
<glob pattern="*.mdtext"/>
85408542
<glob pattern="*.mkd"/>

0 commit comments

Comments
 (0)