about summary refs log tree commit diff stats
path: root/src/render
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-06-17 15:00:58 +0200
committerbptato <nincsnevem662@gmail.com>2022-06-17 15:00:58 +0200
commit7addf30a055aaf1a787d3b32cf4254d7afde65f9 (patch)
tree2ea3bc9f5a4afcbeff38066a13d82aef4d91b6c0 /src/render
parentbe10c6a289273ca8f06400aa6ae88dd7108f4ac6 (diff)
downloadchawan-7addf30a055aaf1a787d3b32cf4254d7afde65f9.tar.gz
Re-implement list items
Now with proper list-style-position: outside support!
Diffstat (limited to 'src/render')
-rw-r--r--src/render/renderdocument.nim4
1 files changed, 4 insertions, 0 deletions
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)