fix: Removing padding when importing from table

This commit is contained in:
Myzel394 2023-10-08 14:05:37 +02:00
parent eb24715275
commit 81cb10545b
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
2 changed files with 1 additions and 4 deletions

View File

@ -87,7 +87,7 @@ local function extract_table(
table[#table + 1] = {}
for content in string.gmatch(line, "[^" .. o.options.export.markdown.characters.vertical .. "]+") do
table[#table][#table[#table] + 1] = content
table[#table][#table[#table] + 1] = string.gsub(content, '^%s*(.-)%s*$', '%1')
end
end
end

View File

@ -58,10 +58,7 @@ local function setup(options)
return
end
print(vim.inspect(start_row), vim.inspect(end_row))
local raw_table = import.extract_table(buffer, start_row, end_row)
print(vim.inspect(raw_table))
local markdown_table = table:import(raw_table)