Preformatted text can make commands appear as comments

The default prompt for the root user contains #. When copy and pasting output of commands run as root in to a preformatted text block to make them nicely formatted and readable, e.g. like this

[root@localhost ~]# uptime
 11:51:46 up 46 min,  2 users,  load average: 0.00, 0.00, 0.00
[root@localhost ~]# 

The commands are displayed in light grey italic text which looks odd and somewhat confusing. Here’s a screenshot in case other people are not seeing what I’m seeing.

It seems like the site is treating anything after # as being comments and applying formatting as such. I’m not copy/pasting any formatting info, it’s just plain text copy/pasted out of a terminal window. Perhaps the site could be made to not apply formatting to text inside preformatted text blocks.

1 Like

I see what you mean:

[root@localhost ~]# uptime
 11:51:46 up 46 min,  2 users,  load average: 0.00, 0.00, 0.00
[root@localhost ~]# 
[test@here ~]$ hello

The block quote can be given a string to tell which format to use. My version above has “bash” after the three opening quotes. Alas, in bash a # starts a comment too (and we see that ‘test’ is a highlighted keyword).

I saw somewhere a list of formats … does “Mattermost” use same markup? Redirect

[root@localhost ~]# uptime
 11:51:46 up 46 min,  2 users,  load average: 0.00, 0.00, 0.00
[root@localhost ~]# 
[test@here ~]$ hello

In this last one format is “text”.

1 Like