From 311fc80cac4b39f772e7b75176fce455d33a6630 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 12 Sep 2010 22:06:53 +0200 Subject: handling of escaped spaces in string.strip --- rst_helpers.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rst_helpers.lua') diff --git a/rst_helpers.lua b/rst_helpers.lua index 4faecbd..a635996 100644 --- a/rst_helpers.lua +++ b/rst_helpers.lua @@ -530,13 +530,15 @@ function helpers.table.simple(raw) end for nc, start in ipairs(starts) do - local stop = stops[nc] + -- last column can exceed layout width + local stop = nc ~= #starts and stops[nc] or #row local cell = { content = "", span = { x = 1, y = 1 }, --ignore = false } cell.content = string.strip(row:sub(start, stop)) + print(">>".. row:sub(start, stop) .."<<", ">>"..cell.content.."<<") if check_span then local start_at, stop_at for colnr, slice in ipairs(bounds.slices) do @@ -555,6 +557,7 @@ function helpers.table.simple(raw) end end cell.span.x = 1 + stop_at - start_at + print(start_at, stop_at, cell.span.x) end newrow[nc] = cell end -- cgit v1.2.3