From 7addf30a055aaf1a787d3b32cf4254d7afde65f9 Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 17 Jun 2022 15:00:58 +0200 Subject: Re-implement list items Now with proper list-style-position: outside support! --- src/render/renderdocument.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/render') diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim index 6227b4c7..9909190d 100644 --- a/src/render/renderdocument.nim +++ b/src/render/renderdocument.nim @@ -236,6 +236,10 @@ proc renderBlockContext(grid: var FlexibleGrid, ctx: BlockContext, x, y: int, te if ctx.specified{"background-color"}.rgba.a != 0: #TODO color blending grid.paintBackground(ctx.specified{"background-color"}, x, y, x + ctx.width, y + ctx.height, term) + if ctx of ListItem: + let ctx = ListItem(ctx) + grid.renderInlineContext(ctx.marker, x - ctx.marker.maxwidth, y, term) + if ctx.inline != nil: assert ctx.nested.len == 0 grid.renderInlineContext(ctx.inline, x, y, term) -- cgit