diff options
author | the lemons <citrons@mondecitronne.com> | 2022-02-09 02:25:44 -0600 |
---|---|---|
committer | the lemons <citrons@mondecitronne.com> | 2022-02-09 02:25:44 -0600 |
commit | 8023abd2b9e16363fdfc60c1e03e6ab4531e3df1 (patch) | |
tree | 159cbeb8d2b00785211fd4056105c9c9846f943e | |
parent | f9eb0b5207117ed74f395210c375dc751c66888d (diff) |
make brackets escapable with backslash
-rwxr-xr-x | zzcxz.cgi | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -199,6 +199,9 @@ local function convert_markup(m) table.insert(result, '<pre><code>') code_block = true else + line = line:gsub("\\\\([%[%]])", "\%1") + line = line:gsub("\\([%[%]])", + { ['['] = "[", [']'] = "]" }) line = line:gsub("%[(.-)%]", function(s) return ('<span class="important">%s</span>'):format(s) |