about summary refs log tree commit diff stats
path: root/src/render/renderdocument.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderdocument.nim')
-rw-r--r--src/render/renderdocument.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim
index 1b195be0..39183c52 100644
--- a/src/render/renderdocument.nim
+++ b/src/render/renderdocument.nim
@@ -128,8 +128,11 @@ proc renderBlockContext(grid: var FlexibleGrid, ctx: BlockContext, x, y: int)
 proc renderInlineContext(grid: var FlexibleGrid, ctx: InlineContext, x, y: int) =
   for row in ctx.rows:
     let x = x + row.relx
-    let y = y + row.rely
+    let y = y + row.rely + row.height
     for atom in row.atoms:
+      # This aligns atoms with the baseline.
+      # (other alignment types in progress)
+      let y = y - atom.height
       if atom of BlockContext:
         let ctx = BlockContext(atom)
         grid.renderBlockContext(ctx, x + ctx.relx, y)