Thiht / markdown-viewer

Firefox add-on to view markdown files
https://addons.mozilla.org/fr/firefox/addon/markdown-viewer/
MIT License
144 stars 36 forks source link

Markdown type not associated with Firefox 44.0b7 on Ubuntu 14.04 #54

Closed gaul closed 8 years ago

gaul commented 8 years ago

I always see the open file dialog. I bisected the regression to 1d9da0ecf4cfaad6f62ce1efb1744bade0d06efc.

screenshot from 2016-01-11 13 00 41

Thiht commented 8 years ago

Can you run grep markdown /etc/mime.types in a command line and share the result? I removed the x-markdown mimetype support last time since I thought it was no longer supported, maybe it's used on Ubuntu... If that's the problem it's an easy fix.

gaul commented 8 years ago

No results:

$ grep -c markdown /etc/mime.types
0
Thiht commented 8 years ago

Well that's not what I expected, what about these three commands:

grep md /etc/mime.types
xdg-mime query filetype randomfile.md # this one is important
file --mime-type randomfile.md # I'm not sure this one work as expected since it doesn't give anything conclusive on my laptop..
gaul commented 8 years ago
$ grep md /etc/mime.types
application/index.cmd
application/msaccess                            mdb
application/vnd.shana.informed.formdata
application/vnd.uplanet.listcmd
application/vnd.uplanet.listcmd-wbxml
application/x-md5                               md5
application/x-ms-wmd                            wmd
chemical/x-chemdraw                             chm
chemical/x-cmdf                                 cmdf
chemical/x-macromodel-input                     mmd mmod
chemical/x-mdl-molfile                          mol
chemical/x-mdl-rdfile                           rd
chemical/x-mdl-rxnfile                          rxn
chemical/x-mdl-sdfile                           sd sdf
chemical/x-mdl-tgf                              tgf
chemical/x-vmd                                  vmd

$ xdg-mime query filetype randomfile.md
text/x-markdown

$ file --mime-type randomfile.md
text/plain
Thiht commented 8 years ago

Ok, the xdg-mime gives what I expected, thank you :) I'll fix that right away

Thiht commented 8 years ago

Here you go, it should work with the version on master.

gaul commented 8 years ago

Confirmed working. #55 has some follow-up comments.