Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
fix(transpiler): table column length
Browse files Browse the repository at this point in the history
Again, fixes the length value & the empty column rendering issue with glow.
  • Loading branch information
luckasRanarison committed Sep 15, 2023
1 parent 785ea88 commit 3603b8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/nvim-devdocs/transpiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@ function transpiler:eval_table(node)
inner_result = inner_result .. self:eval(tcol_child)
end

result_map[i][j] = inner_result:gsub("\n", "")
inner_result = inner_result:gsub("\n", "")
result_map[i][j] = inner_result
colspan_map[i][j] = attributes.colspan and attributes.colspan or 1

if max_col_len_map[j] == nil then max_col_len_map[j] = 0 end
if max_col_len_map[j] == nil then max_col_len_map[j] = 1 end
if max_col_len_map[j] < #inner_result then max_col_len_map[j] = #inner_result end
end
end
Expand Down

0 comments on commit 3603b8e

Please sign in to comment.