exerslide
exerslide copied to clipboard
Unknown content type "text_markdown"
For all md files, I received
Unknown content type "text_markdown"
For each file, I need to add
content_type: text/x-markdown
I think this error came from mime-types library since lookup function only return text/markdown
not text/x-markdown
.
https://github.com/jshttp/mime-types#mimelookuppath
I could fix this by putting https://github.com/kwangkim/exerslide/blob/610cdc7f70e5a6d8ed526220c3b2cbe19450fb1b/packages/exerslide/lib/slide_transforms/registerContentType.js#L45
if (contentType === "text_markdown"){
contentType = "text\/x-markdown"
}
P.S. https://github.com/jshttp/mime-db/blob/66588fec459c0d61cec5c69cfd161b139f75cf7d/db.json#L6561
Another resolution was using 'mkd' instead 'md'.
Sorry I have not seen this issue. Markdown wasn't a standard mime type, so text/x-markdown
was returned. I guess it has changed since then?
The correct (but not so pretty way) would be to create a new file here: https://github.com/facebookincubator/exerslide/tree/785e240a60139f5788558cfae65b01a69dc03184/packages/exerslide-plugin-markdown-converter/contentTypes with name text_markdown.js
that simple exports the same functions as text_x-markdown.js
.
Would you want to provide a PR for that?
Your contribution page does not explain how to test locally. Definitely,
npm test
does not work.
npm install
does not seem to install all packages for each package. Could you give me a little more information?