initial commit
This commit is contained in:
commit
abbd549428
97 changed files with 97614 additions and 0 deletions
11
lua/add-style-as-class.lua
Normal file
11
lua/add-style-as-class.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
function Span(el)
|
||||
local cs = el.attributes['custom-style']
|
||||
if cs then
|
||||
local class = cs
|
||||
:lower()
|
||||
:gsub("%s+", "-")
|
||||
:gsub("[^a-z0-9%-]", "")
|
||||
el.classes:insert("style-" .. class)
|
||||
end
|
||||
return el
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue