Code formatting within a post

When inserting code snippets, Ruby seems to be the best option to format Google Sheets formula in a similar way to a Google Sheet when you click OK to insert the code in a comment,  once the post is submitted, all of formatting is removed. This snippet displays correctly:

 

={"Addition","Multiplication";ARRAYFORMULA(A2:A6+B2:B6),ARRAYFORMULA(A2:A6*B2:B6)}

 

but the colour formatting is removed for the same code in the Comments area.

Is it possible to have the additional formatting maintained in Comments, and possibly add a Google Sheets code formatter (that could be using Ruby) so that people can find the best option quickly?

My apologies - I've just discovered that the formatting within Comments appears to be removed when you Post your comment, but applies correctly when you reload the page. (See screenshot in Reply below).

Solved Solved
0 2 391
1 ACCEPTED SOLUTION

@GerhardZelenka Thanks for joining our Community and thank you for sharing your feedback. It looks like your issue has been resolved. Please let us know if you have any other questions about using the Community. I'd be happy to help. 🙂

View solution in original post

2 REPLIES 2

Code snippet in a reply:

 

={"Addition","Multiplication";ARRAYFORMULA(A2:A6+B2:B6),ARRAYFORMULA(A2:A6*B2:B6)}

 

When Reply is first posted, the code snippet appears as shown:

GerhardZelenka_0-1624603375334.png

 

@GerhardZelenka Thanks for joining our Community and thank you for sharing your feedback. It looks like your issue has been resolved. Please let us know if you have any other questions about using the Community. I'd be happy to help. 🙂