@ 261105.1

260809.1.1 · e1c17e66070524b6e9775760098fd3c90ec8f8b8

https://gitlab.com/saalen/highlight/-/work_items/240 added option to draw indentation guides

--indent-guides marks every indentation level in the leading whitespace, for the html, xhtml, xterm256 and truecolor formats.

A bounded lookahead buffer under readNewLine lets a blank line adopt the indentation of the next line which contains code, so guides are not interrupted by empty lines inside a block. The guides are emitted from insertLineNumber, where the enclosing style is closed and reopened anyway, so they do not disturb multi line strings or comments.

Colours come from the optional IndentGuide theme element and fall back to a dimmed mix of Canvas and Default, which leaves the shipped themes unchanged.

reading declarations

Changes to src/include/preformatter.h. All files

src/include/preformatter.h

@@ -112,6 +112,12 @@ public:         return wrapLines || replaceTabs;     } +    /** \return number of spaces which replace a tab */+    unsigned int getNumberSpaces()+    {+        return numberSpaces;+    }+     bool getReplaceTabs()     {         return replaceTabs;