You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Slate API mentions the ability to give languages friendly names. Ergo, if you want shell Markdown formatting but want to call it "curl."
When I tried this in Whiteboard it didn't work. The most obvious problem was that the languages in the UI navigation looked like [object Object] instead of Node, etc. I had to do the following hacks:
In script.js I added this function:
functionlanguageDetails(lang){if(typeof(lang)==='string'){return{ lang,name: lang}}// If it's an object, then it's [language]: [name]letkeys=Object.keys(lang);lang=keys[0];return{lang: lang,name: lang[lang]};}
The Slate API mentions the ability to give languages friendly names. Ergo, if you want shell Markdown formatting but want to call it "curl."
When I tried this in Whiteboard it didn't work. The most obvious problem was that the languages in the UI navigation looked like
[object Object]
instead ofNode
, etc. I had to do the following hacks:In
script.js
I added this function:And then in
setupLanguages
I changed this line in my fork to make use of it:Then in
index.ejs
I changed the language tabs HTML to this ugly mess:Thanks!
The text was updated successfully, but these errors were encountered: