-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add python media type #2538
add python media type #2538
Conversation
@raphjaph I was realizing after I submitted this that the mime-type returned for the highlight code JS is gonna be Another option is we could just regex if the mimetype contains python then set it to the correct name to pass in as language variable. |
@raphjaph got highlight working with latest commit. |
static/preview-code.js
Outdated
|
||
const inscription = document.documentElement.dataset.inscription; | ||
const response = await fetch(`/content/${inscription}`); | ||
const contentType = response.headers.get("content-type"); | ||
const language = contentType.split("/")[1]; | ||
let language = contentType.split("/")[1]; | ||
if (language.includes("python")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (language.includes("python")) { | |
if (language === "x-python") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFG
Add file type python closes #1481