Skip to content

Commit 25e4351

Browse files
committed
Same urlize() everywhere.
1 parent 797c446 commit 25e4351

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/markdown.lua

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
**Author:** Niklas Frykholm, <[email protected]>
77
**Date:** 31 May 2008
8-
**Edited by:** Marcus Thunström (2018-06-14, 2021-05-06)
8+
**Edited by:** Marcus Thunström (2018-06-14, 2021-05-31)
99
1010
This is an implementation of the popular text markup language Markdown in pure Lua.
1111
Markdown can convert documents written in a simple and easy to read text format
@@ -271,16 +271,6 @@ local function strip_html(html)
271271
return text
272272
end
273273

274-
local function urlize(text)
275-
text = text
276-
:lower()
277-
:gsub("[%p ]+", "-")
278-
:gsub("^%-+", "")
279-
:gsub("%-+$", "")
280-
281-
return text == "" and "-" or text
282-
end
283-
284274
----------------------------------------------------------------------
285275
-- Hash
286276
----------------------------------------------------------------------

0 commit comments

Comments
 (0)