md_escape: Escape [] richtig (danke @Akamaru)
This commit is contained in:
@ -490,15 +490,8 @@ end
|
||||
|
||||
function utilities.markdown_escape(text)
|
||||
text = text:gsub('_', '\\_')
|
||||
text = text:gsub('%[', '\\[')
|
||||
text = text:gsub('%]', '\\]')
|
||||
text = text:gsub('%*', '\\*')
|
||||
text = text:gsub('`', '\\`')
|
||||
return text
|
||||
end
|
||||
|
||||
function utilities.markdown_escape_simple(text)
|
||||
text = text:gsub('_', '\\_')
|
||||
text = text:gsub('%[', '[[')
|
||||
text = text:gsub('%]', ']]')
|
||||
text = text:gsub('%*', '\\*')
|
||||
text = text:gsub('`', '\\`')
|
||||
return text
|
||||
|
Reference in New Issue
Block a user