No-Parse option for posts?

VBulletin has NOPARSE tags that stop it from processing any HTML positioned between the tags, within a post.

This allows people to post messages explaining how to do certain markup commands, without it actually resolving the commands in that post.

Is there any way to do this on Discourse?

Use back-ticks to enclose the code.

Or select the text and click the preformatted text button:

So it looks like this:

<strong>This is bold</strong>

7 Likes

Thanks @omarfilip. That is exactly what I needed.

Nice and easy to do, once you know how.

Thank you.

1 Like

You can also do blocks with sections of triple backticks.

```
<code goes here>
```

You can also make a single line be code by preceding it with 4 spaces.

6 Likes

I recommend indenting by 4 spaces, unless you need syntax color highlighting (e.g. you are posting literal computer source code of some kind like Fortran or HTML).

like this

Just type

spacespacespacespacelike this

4 Likes

Is there a difference between four spaces and fenced code blocks I always thought they are equivalent!

Mostly but the fenced blocks imply source code and colored syntax highlighting.

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