Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37661853
en ru br
ALT Linux repositórios
S:0.32-alt1_8

Group :: Desenvolvimento/Outros
RPM: lua-markdown

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: lua-markdown-0.32-lua-5.2.patch
Download


diff -up lua-markdown-0.32/markdown.lua.lua-52 lua-markdown-0.32/markdown.lua
--- lua-markdown-0.32/markdown.lua.lua-52	2013-01-04 14:52:50.000000000 -0500
+++ lua-markdown-0.32/markdown.lua	2013-05-10 16:50:57.092290723 -0400
@@ -116,6 +116,18 @@ THE SOFTWARE.
 // Niklas
 ]]
 
+setfenv = setfenv or function(f, t)
+    f = (type(f) == 'function' and f or debug.getinfo(f + 1, 'f').func)
+    local name
+    local up = 0
+    repeat
+        up = up + 1
+        name = debug.getupvalue(f, up)
+    until name == '_ENV' or name == nil
+    if name then
+      debug.upvaluejoin(f, up, function() return t end, 1) -- use unique upvalue, set it to f
+    end
+end 
 
 -- Set up a table for holding local functions to avoid polluting the global namespace
 local M = {}
@@ -186,7 +198,7 @@ function find_first(s, patterns, index)
 		local match = {s:find(p, index)}
 		if #match>0 and (#res==0 or match[1] < res[1]) then res = match end
 	end
-	return unpack(res)
+	return table.unpack(res)
 end
 
 -- If a replacement array is specified, the range [start, stop] in the array is replaced
@@ -1356,4 +1368,4 @@ if arg and arg[0]:find("markdown%.lua$")
 	run_command_line(arg)
 else
 	return markdown
-end
\ No newline at end of file
+end
diff -up lua-markdown-0.32/markdown-tests.lua.lua-52 lua-markdown-0.32/markdown-tests.lua
--- lua-markdown-0.32/markdown-tests.lua.lua-52	2013-05-10 16:52:04.151288326 -0400
+++ lua-markdown-0.32/markdown-tests.lua	2013-05-10 16:52:15.051287936 -0400
@@ -4407,10 +4407,10 @@ local function run_tests()
 	-- Do any <pre></pre> sequences in s1 and s2 match up perfectly?
 	local function pre_equal(s1, s2)
 		local pre = {}
-		for p in s1:gfind("<pre>.-</pre>") do
+		for p in s1:gmatch("<pre>.-</pre>") do
 			pre[#pre+1] = p
 		end
-		for p in s2:gfind("<pre>.-</pre>") do
+		for p in s2:gmatch("<pre>.-</pre>") do
 			if p ~= pre[1] then return false end
 			table.remove(pre, 1)
 		end
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009