Highlighted Text in the Forum

Oh, and totally unrelated to this issue, funny how help in the file listing automagically turned green. (-:

@Sara did I find an undocumented feature?!

Hi Yggy!
It is (kinda) documented and one of my amazing colleagues found out what it is :wink:
Probably it’s this: discourse/highlight.js at 685e0da8c39035c6ea78da478c70714f80c98dbc · discourse/discourse · GitHub

1 Like

Thanks

I don’t want to hijack this posting, so perhaps it can be split and placed under Meta or where it deems to be appropriate.

The highlighting kinda suggests that you can specify what code you are posting or that the highlighting somehow recognise what kind of code it might be. In the latter part it failed since it wasn’t really bash.

I didn’t test it yet, but is all default highlighting builtin with Discourse as suggested in following link possible, or is this forum configured to only highlight certain code?

Now we are talking :slight_smile:

I think it is just a default configuration that highlights the words as written in highlight.js. I think it’s bash, shell and… Z shell?
Where did it fail though? I think it should be possible to configure it, so it would work with other languages but I cannot see a good use case for that in Checkmk forum atm :thinking:

Thanks for splitting.

It failed by highlighting help as something to be highlighted, while it shouldn’t.
But if it didn’t, we wouldn’t be talking now. (-:

The Discourse Meta link mentioned a link that you can configure what code (kinda documented in your link) to highlight or not. Maybe, it is also possible to set a default code, like everything is text unless you specify, so it doesn’t highlight. But then you might miss highlighting recognition when people don’t know they can highlight their code. Before this happened I was still oblivious about it …

Use case to highlight code?
To easily spot errors in code, when people post something, regarding code used in Checkmk, config files, plugins…
Well, we’re monitoring IT, so theoretically it could be anything.

I was just curious if it was configured to default all, or if specified, which coding languages Tribe29 set it to.