Overview
Comment: | fix stupid table bug |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e8ab2a68d88ab8e76717695264977a61 |
User & Date: | lexi on 2022-09-09 21:20:50 |
Other Links: | manifest | tags |
Context
2022-09-09
| ||
22:02 | update docs check-in: 35f8445017 user: lexi tags: trunk | |
21:20 | fix stupid table bug check-in: e8ab2a68d8 user: lexi tags: trunk | |
21:08 | macro & doc improvements check-in: 52f88f818d user: lexi tags: trunk | |
Changes
Modified cortav.lua from [827b243474] to [454581060f].
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
....
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
|
end end if buf.str ~= '' then flush() end for _,v in pairs(row) do v.spans = ct.parse_span(v.str, c) c.doc.docjob:hook('meddle_span', v.spans, v) end if #c.sec.blocks > 1 and c.sec.blocks[#c.sec.blocks].kind == 'table' then local tbl = c.sec.blocks[#c.sec.blocks] table.insert(tbl.rows, row) j:hook('block_table_attach', c, tbl, row, l) j:hook('block_table_row_insert', c, tbl, row, l) else local tbl = { kind = 'table'; ................................................................................ end}; {seq = '\t', pred = function(l) return (l:match '\t+([^:]+):%s*(.*)$') end; fn = blockwrap(function(l,c,j,d) local ref, val = l:match '\t+([^:]+):%s*(.*)$' local last = d[#d] local rsrc if last and last.kind == 'resource' or last.kind == 'embed' or last.kind == 'macro' then last.props = last.props or {} last.props[ref] = val j:hook('set_prop', c, last, ref, val, l) rsrc = last elseif last and last.kind == 'reference' and last.rsrc then last.rsrc.props[ref] = val rsrc = last.rsrc |
|
|
|
|
|
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
....
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
|
end end if buf.str ~= '' then flush() end for _,v in pairs(row) do v.spans = ct.parse_span(v.str, c) c.doc.docjob:hook('meddle_span', v.spans, v) end if next(c.sec.blocks) and c.sec.blocks[#c.sec.blocks].kind == 'table' then local tbl = c.sec.blocks[#c.sec.blocks] table.insert(tbl.rows, row) j:hook('block_table_attach', c, tbl, row, l) j:hook('block_table_row_insert', c, tbl, row, l) else local tbl = { kind = 'table'; ................................................................................ end}; {seq = '\t', pred = function(l) return (l:match '\t+([^:]+):%s*(.*)$') end; fn = blockwrap(function(l,c,j,d) local ref, val = l:match '\t+([^:]+):%s*(.*)$' local last = d[#d] local rsrc if last and (last.kind == 'resource' or last.kind == 'embed' or last.kind == 'macro') then last.props = last.props or {} last.props[ref] = val j:hook('set_prop', c, last, ref, val, l) rsrc = last elseif last and last.kind == 'reference' and last.rsrc then last.rsrc.props[ref] = val rsrc = last.rsrc |