[ 
https://issues.apache.org/jira/browse/TIKA-4724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079951#comment-18079951
 ] 

ASF GitHub Bot commented on TIKA-4724:
--------------------------------------

ec1oud opened a new pull request, #2806:
URL: https://github.com/apache/tika/pull/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)
   
   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for your contribution to [Apache Tika](https://tika.apache.org/)! 
Your help is appreciated!
   
   Before opening the pull request, please verify that
   * there is an open issue on the [Tika issue 
tracker](https://issues.apache.org/jira/projects/TIKA) which describes the 
problem or the improvement. We cannot accept pull requests without an issue 
because the change wouldn't be listed in the release notes.
   * the issue ID (`TIKA-XXXX`)
     - is referenced in the title of the pull request
     - and placed in front of your commit messages surrounded by square 
brackets (`[TIKA-XXXX] Issue or pull request title`)
   * commits are squashed into a single one (or few commits for larger changes)
   * Tika is successfully built and unit tests pass by running `./mvnw clean 
test`
   * there should be no conflicts when merging the pull request branch into the 
*recent* `main` branch. If there are conflicts, please try to rebase the pull 
request branch on top of a freshly pulled `main` branch
   * if you add new module that downstream users will depend upon add it to 
relevant group in `tika-bom/pom.xml`.
   
   We will be able to faster integrate your pull request if these conditions 
are met. If you have any questions how to fix your problem or about using Tika 
in general, please sign up for the [Tika mailing 
list](http://tika.apache.org/mail-lists.html). Thanks!
   




> Need to add text/markdown
> -------------------------
>
>                 Key: TIKA-4724
>                 URL: https://issues.apache.org/jira/browse/TIKA-4724
>             Project: Tika
>          Issue Type: Bug
>          Components: mime
>    Affects Versions: 3.3.0
>            Reporter: Shawn Rutledge
>            Priority: Major
>
> [https://www.rfc-editor.org/rfc/rfc7763.html] says "text/markdown" is the 
> right mime type for markdown, but Tika has it only as text/x-web-markdown.  
> This causes some trouble in Qt on platforms where we use Tika as our mime 
> type database:  [https://doc.qt.io/qt-6/qfiledialog.html#setMimeTypeFilters] 
> is used to map mime types to name.extension filters for a file dialog.  The 
> user expects to use "text/markdown" as the mime type for markdown, and on 
> platforms that have independent mime databases (such as Linux), that works: 
> the result is "*.md" shows up as one of the file filters for the dialog 
> (along with whatever alternative extensions).  On macOS though, it doesn't, 
> because there we use tika, and it expects text/x-web-markdown.
> The Qt bug is [https://qt-project.atlassian.net/browse/QTBUG-146675] and 
> maybe we can fix it in Qt for now; but we periodically sync the tika 
> database, so it can easily come up again if it's not fixed upstream.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to