XML not visible in post

(Ivan Rapekas) #1

Hi, there is invisible XML block below.

Here is the end of XML block.

(Jeff Atwood) #2

This is by design, and how Markdown works… put it in a code block unless you want it to be interpreted as illegal non-whitelisted html.

(Ivan Rapekas) #3

Though I expected this behavior, I would like to have a small warning during posting like this: ‘Your message contains a code, consider to put it in a code block using triple back quotes (unless …)’ :slight_smile:

(Sam Saffron) #4

This is a pretty enormous problem. I do not see Discourse core adding such a feature for “automatic code block missing” warning. Not sure if even Stack Overflow do this.

But … it is an interesting idea for a plugin, which would have to use some very fancy regex mountain or a custom parser of sorts.

(Jeff Atwood) #5

This has been covered at EXTREME length in other topics about “auto detecting code when a user can’t figure out how to properly format code”

And yes SO does do this, because the cost of not doing it on a site about programming was super high.

(Sam Saffron) #6

closing this as … by design and covered at:

(Sam Saffron) #7