lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Aug 29, 2011 at 12:58 PM, Gavin Wraith <> wrote:
> That is because it uses functions of type string->string
> instead of rope->rope. It is not sufficiently lazy.

Yes, it does this kind of thing:

function span_transform(text)
	text = code_spans(text)
	text = escape_special_chars(text)
	text = images(text)
	text = anchors(text)
	text = auto_links(text)
	text = amps_and_angles(text)
	text = emphasis(text)
	text = line_breaks(text)
	return text

_Lots_ of gsub operations on big chunks of text. It would be an
interesting exercise to do a well-performing Lua version but whenever
I get the urge I lie down until the feeling passes.

steve d.