From a141b1d13f127dbea0874ccf125df6266da7ae39 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 12 Nov 2015 09:35:33 -0500 Subject: Fixed '%' escape sequences in snippets; modules/textadept/snippets.lua --- modules/textadept/snippets.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index bfb43bb9..1584dc13 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -277,7 +277,9 @@ local function new_snippet(text, trigger) placeholder.position = snippet.start_pos + placeholder.position -- absolute text_part, placeholder, e = patt:match(text, e) end - if text_part ~= '' then snapshot.text = snapshot.text..text_part end + if text_part ~= '' then + snapshot.text = snapshot.text..text_part:gsub('%%(%p)', '%1') + end snippet.snapshots[0] = snapshot -- Insert the snippet into the buffer and mark its end position. -- cgit v1.2.3