csl-clio/Utilitaires/context-aux-functions.lua

4 lines
177 B
Lua

function split_cmd_at_char(arg, delimiter, replacement_cmd)
return string.gsub(arg, '([^' .. delimiter .. ']+-?)', '\\' .. replacement_cmd .. '{%1}\\discretionary{}{}{}')
end