Welcome! Please see the About page for a little more info on how this works.

0 votes
in Meta by

(defn my-cool-defn [])

in the above example i'm trying to tell the markdown engine that i want my code to be highlighted as clojure, but i get "clojure" being output as well. i am not sure my code is even in a code block, but it is formatted differently. is this a bug with this website?

1 Answer

+1 vote

In the editor, the top bar displays {} - select the code block and press that button to make that block properly formatted.

It's similar to StackOverflow - code blocks are distinguished by each line being indented with a few spaces on the left.

i have never done markdown code highlighting like that. i always use triple backquotes, on stack overflow as well. i just tried what you told me and i don't know how to tell it what language to highlight in

(defn my-fn [])

the "clojure" part is confusing me a lot, where do i put that if all i do is indent?
I don't think the editor is configured to support that functionality. At the very least, I haven't been able to do it myself and I have never seen other people do it either.
ok, i thought i was just missing something because the highlighting sometimes happens and sometimes doesn't. when it does happen it doesn't really look right, either.