aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-09 02:34:48 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-09 02:34:48 -0600
commitaa6d91a90f14b2f29beb6f8dbdaaa6e5c50be81b (patch)
tree4295e27ed1d650f590848e0b645b5b1cb5b6077e
parent8023abd2b9e16363fdfc60c1e03e6ab4531e3df1 (diff)
make it possible to escape backslash and the bracket at the same time
-rwxr-xr-xzzcxz.cgi2
1 files changed, 1 insertions, 1 deletions
diff --git a/zzcxz.cgi b/zzcxz.cgi
index 797f2ea..cbd93e4 100755
--- a/zzcxz.cgi
+++ b/zzcxz.cgi
@@ -199,7 +199,7 @@ local function convert_markup(m)
table.insert(result, '<pre><code>')
code_block = true
else
- line = line:gsub("\\\\([%[%]])", "&#92;%1")
+ line = line:gsub("\\\\([%[%]\\])", "&#92;%1")
line = line:gsub("\\([%[%]])",
{ ['['] = "&#91;", [']'] = "&#93;" })
line = line:gsub("%[(.-)%]",