Closed getreu closed 7 years ago
Hello @getreu,
According to this RfC 6648 http://www.rfc-editor.org/bcp/bcp178.txt
I'm not familiar with RFC but this page is more about deprecating parameters starting with "X-", where the "X" is commonly understood to stand for "eXperimental" or "eXtension"... no ?
There is an issue with the firefox plug-in. Once the new mime type enabled, the plugin does not render any more. Chrome and chromium do.
This is strange because we are not using (at least explicitly) the MIME type to decide if we must convert the content or not. In fact we are checking two things:
document.location
is ending with .asciidoc
, .adoc
, .ad
or .asc
OR containing .asciidoc?
, .adoc?
, .ad?
or .asc?
document.contentType
is not HTMLhttps://github.com/asciidoctor/asciidoctor-firefox-addon/blob/master/data/asciidocify.js#L12
I will try to reproduce this issue, the only thing I have to do is add text/asciidoc adoc asciidoc
in /etc/mime.types
and try to load a local file named test.adoc
?
Could you tell me which version of Firefox/Iceweasel are you using ?
Thanks
I will try to reproduce this issue, the only thing I have to do is add
text/asciidoc adoc asciidoc
in /etc/mime.types and try to load a local file named test.adoc ? Yes that's all. Could you tell me which version of Firefox/Iceweasel are you using ? iceweasel 38.5.0
I remember now: firefox wants to save the adoc file on disk ...
I don't know how to handle this issue because as soon as you define a MIME type, Firefox tries to find a plugin (not an add-on) to "open" the file. As there's no AsciiDoc plugin, Firefox tries to download the file.
I think only plugin can define "MIME type" and AFAIK there's no way to tell Firefox to do nothing :disappointed:
I've never create a plugin for Firefox so if someone want to give it a try, here is the documentation: https://developer.mozilla.org/en-US/docs/Plugins/Guide/Plug-in_Development_Overview
As a workaround, you need to remove this line from /etc/mime.types
I bumped into this while working on gdoc2adoc and wanted to force google to save with .adoc extension rather than .adoc.txt.
Worked around this limitation in Firefox by installing https://addons.mozilla.org/En-us/firefox/addon/open-in-browser/ which allow me to choose to open .adoc with mimetype text/adoc in browser anyway.
Thanks for sharing.
Since the Firefox and the Chrome extension had merged, I'm closing this issue (because this issue is specific to Firefox).
@getreu If you reproduce this issue with the latest version on Firefox 57, please open a new issue here: https://github.com/asciidoctor/asciidoctor-chrome-extension/issues
Re: Mimetype for Asciidoc In reply to this post by Hocdoc
According to this RfC 6648 http://www.rfc-editor.org/bcp/bcp178.txt
The
/etc/mime.types
entry should be:There is an issue with the firefox plug-in. Once the new mime type enabled, the plugin does not render any more. Chrome and chromium do.