Indentation in automatic line breaks in code blocks

(Line 2 starts with a tab character, not space characters)
(What I would like to see displayed)


(Actual displayed)

What you expect to see is not how it currently works. A tab character is a character, not a paragraph formatting feature. It inserts black space until the next tab stop, and does not influence what happens with the remainder of the line.

A code block is aimed to display literal characters. To display text in code block the way you want, you need to insert the characters that control such display: hard returns for line breaks, and tabs at the start of the line for indents.

Obsidian works based on markdown, and intends to adhere for a majority to this (unfortunately loose) standard. Markup languages like markdown and html do not intent to give formatting instructions. Instead, they are intended to tag text elements with different semantic meanings, like “this is a heading”, “this should be emphased”, “this is a quote”. Formatting is done at rendering time. Different software may render differently. For example, most markdown software will render “emphasis” (i.e. *…* or _…_*) as italics. Other software could use underline instead. Many software will render quotes (> …`) as indented text, although Obsidian with the default style sheet will also add a purple vertical line to the left.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.