Code formatting in new forum posts


(Ben Edwards) #1

Just a quick note on showing code in the new forums. You don’t need to use CODE tags. Simply copy in your syntax, highlight it, and and click the little button between quote and upload in the formatting menu.

Also if you come across an old post (of your own) and want to modify it to look nice again, you can remove the…

<pre><code>

and

</pre></code>

From around the block of code and then highlight the code and change it as stated above.

Enjoy.


CoRE and Piston Rules Engine, first design steps
(Eric) #2

Also, Discourse handles Github Flavored Markdown. You can also enter a code block using 4 backticks, and specify a language:

```js
console.log("foo");
```

will output:

    console.log("foo");

…for example. It seems to work with Groovy.


(Ben Edwards) #3

Cool! I also will point out that I love how it brings in github links: