Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

code macro in confluence removes common whitespace prefix from all lines

Chris Reed February 12, 2020

Doc for the code macro states:

 

You type the code block directly into the macro placeholder in the editor. Note that any white space contained in the placeholder is not manipulated in any way by the Code Block macro. This is to provide the writer with flexibility over code indentation.

But, if I paste several lines which all have a common tab prefix, while they're shown with the common prefix in the edit view, when viewing the page, the common whitespace prefix is removed, shifting the text to the left margin.

My use case is explaining parts of python code, so the whitespace is important.

I can use { pre } but that loses the other functionality and border of the code block.

Confluence 6.13.4

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events