From e0435743807c6f0c3b1d04cc89089c0528c9b33b Mon Sep 17 00:00:00 2001 From: bptato Date: Thu, 15 Dec 2022 21:41:51 +0100 Subject: Fix tab width in pre --- src/layout/engine.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/layout') diff --git a/src/layout/engine.nim b/src/layout/engine.nim index 6a1e6e5c..a122b7fa 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -292,6 +292,8 @@ proc processWhitespace(state: var InlineState, c: char) = of WHITESPACE_PRE_LINE, WHITESPACE_PRE, WHITESPACE_PRE_WRAP: if c == '\n': state.ictx.flushLine(state.computed, state.maxwidth) + elif c == '\t': + state.ictx.whitespacenum = (state.ictx.whitespacenum div 8 + 1) * 8 else: inc state.ictx.whitespacenum -- cgit 1.4.1-2-gfad0