diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-12 22:06:53 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-12 22:06:53 +0200 |
commit | 311fc80cac4b39f772e7b75176fce455d33a6630 (patch) | |
tree | 50623757a23318b8b4a141f6d03272c8a413b1e2 /rst_helpers.lua | |
parent | 77fcc38a9a906d6a44ab2eac971714bba1970115 (diff) | |
download | context-rst-311fc80cac4b39f772e7b75176fce455d33a6630.tar.gz |
handling of escaped spaces in string.strip
Diffstat (limited to 'rst_helpers.lua')
-rw-r--r-- | rst_helpers.lua | 5 |
1 files changed, 4 insertions, 1 deletions
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 |