Incomplete Markup class instantiation; indentation now using <div> again
authorTimm S. Mueller <tmueller@neoscientists.org>
Sat, 15 Dec 2007 17:32:40 +0100
changeset 223b2151b233fa7
parent 222 cb91d3398f6e
child 225 67a7baf150c1
Incomplete Markup class instantiation; indentation now using <div> again
cgi-bin/tek/class/loona.lua
     1.1 --- a/cgi-bin/tek/class/loona.lua	Sat Dec 15 16:53:38 2007 +0100
     1.2 +++ b/cgi-bin/tek/class/loona.lua	Sat Dec 15 17:32:40 2007 +0100
     1.3 @@ -12,7 +12,7 @@
     1.4  local cgi = require "tek.class.cgi"
     1.5  local Request = require "tek.class.cgi.request"
     1.6  local util = require "tek.class.loona.util"
     1.7 -local markup = require "tek.class.markup"
     1.8 +local Markup = require "tek.class.markup"
     1.9  
    1.10  local boxed_G = {
    1.11  	string = string, table = table,
    1.12 @@ -81,6 +81,10 @@
    1.13  	end
    1.14  end
    1.15  
    1.16 +function Markup:indent()
    1.17 +	return '<div class="indent">', '</div>'
    1.18 +end
    1.19 +
    1.20  -------------------------------------------------------------------------------
    1.21  --	class Session:
    1.22  -------------------------------------------------------------------------------
    1.23 @@ -1585,11 +1589,10 @@
    1.24  
    1.25  function Loona:domarkup(s)
    1.26  	local t = { }
    1.27 -	local is_dynamic = markup:new { input = s,
    1.28 -		wrfunc = function(s) insert(t, s) end }:run()
    1.29 -	return concat(t), is_dynamic
    1.30 -
    1.31 --- 	return markup.load(s)
    1.32 +	local is_dynamic = Markup:new { input = s,
    1.33 +		features = "hespcadlintf", indentchar = " ",
    1.34 +		wrfunc = function(s) table.insert(t, s) end }:run()
    1.35 +	return table.concat(t), is_dynamic
    1.36  end
    1.37  
    1.38