cortav  Diff

Differences From Artifact [2576638f1f]:

To Artifact [e2f30c819c]:


806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
		{seq = '##', parse = insert_var_ref(true)};
		{seq = '#', parse = insert_var_ref(false)};
	}
end

function ct.parse_span(str,ctx)
	local function delimited(start, stop, s)
		-- local r = { pcall(ss.str.delimit, 'utf8', start, stop, s) }
		-- if r[1] then return table.unpack(r, 2) end
		-- ctx:fail(tostring(e))
		return ss.str.delimit(ss.str.enc.utf8, start, stop, s)
	end
	local buf = ""
	local spans = {}
	local function flush()
		if buf ~= "" then
			table.insert(spans, buf)
			buf = ""







|
|
|
<







806
807
808
809
810
811
812
813
814
815

816
817
818
819
820
821
822
		{seq = '##', parse = insert_var_ref(true)};
		{seq = '#', parse = insert_var_ref(false)};
	}
end

function ct.parse_span(str,ctx)
	local function delimited(start, stop, s)
		local r = { pcall(ss.str.delimit, nil, start, stop, s) }
		if r[1] then return table.unpack(r, 2) end
		ctx:fail(tostring(r[2]))

	end
	local buf = ""
	local spans = {}
	local function flush()
		if buf ~= "" then
			table.insert(spans, buf)
			buf = ""