Is it possible to manually add a newly supported Prismjs language?

I went into the Developer Interface and was able to find my way into the prism.min.js file. I saw that both the prism.js file that contained the MAXScript language and the code in the Developer interface were of version 1.24.1. However, I noticed that the language definitions in the developer interface skip over MAXScript.

It seems like it wouldn’t be too irreversible to just copy the code into the file and see what happens. Not sure this is a great idea. That is why I am here. I know I could just reinstall Obsidian. But since this is beyond what I am comfortable with, I wanted to double check. Oh well, I just tried it, but unfortunately after adding the single line MAXscript, it first looks like this:


and then when I do ctrl+s, I see the orange triangular warning telling me that the changes are not saved to my file system
image
which I confirmed is in fact the case when I reopen Obsidian.

What I’m trying to do

I understand that Obsidian uses Prism to do the syntax highlighting of supported languages for code blocks. But I don’t understand much more than that unfortunately. So, when I saw that MAXScript was unsupported, I requested it on GitHub only 15 days ago. Today, I was alerted that the commit was merged with the master. I then was happy to find that I was able to download the language support file as either a css or js file from the Prism website.

In a total coincidence, I happened to see in the Developers section of v0.12.16 release that “There is now access to the following bundled libraries: PDF.js, Mermaid, Prism, …”, and it felt like it was meant to be. However, I soon realized I was far out of my depth in trying to implement something like this when it is likely that relatively soon, a release of Obsidian will probably just incorporate the language support file.

If I wasn’t in the middle of a class where I am taking extensive screenshots of my MAXScript code with my notes in Obsidian, I would just be happy to wait. However, if I could get this implemented sooner than later, I would be in a much better, searchable and full color place, which would be awesome! Any ideas? Even just a nudge in the right direction would mean a lot. Thanks so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.