Emphasis update, rndstr module
This commit is contained in:
parent
11da3d0598
commit
97b93c7213
|
@ -4,8 +4,14 @@ format.filter = function(text)
|
||||||
for _, s in ipairs {"%*%*", "%_%_"} do
|
for _, s in ipairs {"%*%*", "%_%_"} do
|
||||||
text = text:gsub(s .. "([^%s][^<>]-[^%s][%*%_]?)" .. s, txtb("%1"));
|
text = text:gsub(s .. "([^%s][^<>]-[^%s][%*%_]?)" .. s, txtb("%1"));
|
||||||
end;
|
end;
|
||||||
for _, s in ipairs {"%*", "%_"} do
|
for _, s in ipairs {"%*"} do
|
||||||
text = text:gsub(s .. "([^%s_][^<>_]-[^%s_])" .. s, txtem("%1"));
|
text = text:gsub(s .. "([^%s_][^<>_]-[^%s_])" .. s, txtem("%1"));
|
||||||
end;
|
end;
|
||||||
|
for _, s in ipairs {"%_"} do
|
||||||
|
text = text:gsub(s .. "([^%s_][^<>_]-[^%s_])" .. s, txtu("%1"));
|
||||||
|
end;
|
||||||
|
for _, s in ipairs {"%-"} do
|
||||||
|
text = text:gsub(s .. " ([^%s_][^<>_]-[^%s_]) " .. s, txtst("%1"));
|
||||||
|
end;
|
||||||
return text;
|
return text;
|
||||||
end
|
end
|
||||||
|
|
3
rndstr.lua
Normal file
3
rndstr.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
rndstr = function(strings)
|
||||||
|
return strings[rnd(stead.table.maxn(strings))];
|
||||||
|
end
|
Loading…
Reference in a new issue