diff options
-rw-r--r-- | src/layout/engine.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index f45181dc..19dd303c 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -57,7 +57,7 @@ proc addAtom(ictx: InlineContext, atom: InlineAtom, maxwidth: int, specified: CS # Line wrapping if specified{"white-space"} notin {WHITESPACE_NOWRAP, WHITESPACE_PRE}: - if specified{"word-break"} == WORD_BREAK_NORMAL and ictx.thisrow.width + atom.width > maxwidth: + if specified{"word-break"} == WORD_BREAK_NORMAL and ictx.thisrow.width + atom.width + shift > maxwidth: ictx.finishRow() if not whitespacepre: # No whitespace on newline |