cortav  Diff

Differences From Artifact [827b243474]:

To Artifact [454581060f]:


  1033   1033   		end
  1034   1034   	end
  1035   1035   	if buf.str ~= '' then flush() end 
  1036   1036   	for _,v in pairs(row) do
  1037   1037   		v.spans = ct.parse_span(v.str, c)
  1038   1038   		c.doc.docjob:hook('meddle_span', v.spans, v)
  1039   1039   	end
  1040         -	if #c.sec.blocks > 1 and c.sec.blocks[#c.sec.blocks].kind == 'table' then
         1040  +	if next(c.sec.blocks) and c.sec.blocks[#c.sec.blocks].kind == 'table' then
  1041   1041   		local tbl = c.sec.blocks[#c.sec.blocks]
  1042   1042   		table.insert(tbl.rows, row)
  1043   1043   		j:hook('block_table_attach', c, tbl, row, l)
  1044   1044   		j:hook('block_table_row_insert', c, tbl, row, l)
  1045   1045   	else
  1046   1046   		local tbl = {
  1047   1047   			kind = 'table';
................................................................................
  1114   1114   	end};
  1115   1115   	{seq = '\t', pred = function(l)
  1116   1116   		return (l:match '\t+([^:]+):%s*(.*)$')
  1117   1117   	end; fn = blockwrap(function(l,c,j,d)
  1118   1118   		local ref, val = l:match '\t+([^:]+):%s*(.*)$'
  1119   1119   		local last = d[#d]
  1120   1120   		local rsrc
  1121         -		if last and last.kind == 'resource'
  1122         -		         or last.kind == 'embed'
  1123         -               or last.kind == 'macro' then
         1121  +		if last and (last.kind == 'resource'
         1122  +		         or  last.kind == 'embed'
         1123  +               or  last.kind == 'macro') then
  1124   1124   			last.props = last.props or {}
  1125   1125   			last.props[ref] = val
  1126   1126   			j:hook('set_prop', c, last, ref, val, l)
  1127   1127   			rsrc = last
  1128   1128   		elseif last and last.kind == 'reference' and last.rsrc then
  1129   1129   			last.rsrc.props[ref] = val
  1130   1130   			rsrc = last.rsrc