[tekui-devel] tekui: Headnodes now support digits in their names; in local anc...

Timm S. Mueller tmueller at neoscientists.org
Mon Apr 7 03:42:24 CEST 2008


details:   http://hg.teklib.org/tekui/rev/94bf4ec16b9c
changeset: 407:94bf4ec16b9c
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Mon Apr 07 02:45:02 2008 +0200
description:
Headnodes now support digits in their names; in local anchors (without alias)
the number sign is now suppressed in the output

diffs (40 lines):

diff -r 6aa3f6b0f248 -r 94bf4ec16b9c tek/class/markup.lua
--- a/tek/class/markup.lua	Sat Apr 05 08:31:02 2008 +0200
+++ b/tek/class/markup.lua	Mon Apr 07 02:45:02 2008 +0200
@@ -25,7 +25,7 @@ local ipairs = ipairs
 
 module("tek.class.markup", tek.class)
 
-_VERSION = "Markup 2.2"
+_VERSION = "Markup 2.3"
 local Markup = _M
 
 -------------------------------------------------------------------------------
@@ -642,7 +642,7 @@ function Markup:run()
 					function(s1, id, text, s2)
 					local l = min(s1:len() - 1, s2:len() - 1, 5)
 					popwhilenot("document")
-					id = id:gsub("[^a-zA-Z%_%-%.%:]", "")
+					id = id:gsub("[^a-zA-Z%d%_%-%.%:]", "")
 					push("headnode", id, text, l, s2:sub(1, 1) == "}")
 					return ""
 				end)
@@ -651,7 +651,7 @@ function Markup:run()
 					function(s1, text, s2)
 					local l = min(s1:len() - 1, s2:len() - 1, 5)
 					popwhilenot("document")
-					local id = text:gsub("[^a-zA-Z%_%-%.%:]", "")
+					local id = text:gsub("[^a-zA-Z%d%_%-%.%:]", "")
 					push("headnode", id, text, l, s2:sub(1, 1) == "}")
 					return ""
 				end)
@@ -818,6 +818,9 @@ function Markup:run()
 								end
 								if not link then -- [[....]]
 									a, link, b = line:match("^(.-)%[%[([^%]]-)%]%](.*)%s*$")
+									if link then
+										title = link:match("^#?(.*)$")
+									end
 								end
 								if not link then -- class:function()
 									a, link, b = line:match("^(.-)(%a[%w_:.]-%(%))(.*)%s*$")


More information about the tekui-devel mailing list