From a7d479becd5b94e92e11552dacf51c31abcbcae4 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 7 Oct 2015 09:23:22 -0400 Subject: Fixed '%' escape sequences in snippets; modules/textadept/snippets.lua --- modules/textadept/snippets.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index af7819b9..2c2bbf15 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -207,7 +207,9 @@ local function new_snippet(text, trigger) placeholder.id = #snapshot.placeholders + 1 snapshot.placeholders[#snapshot.placeholders + 1] = placeholder 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 placeholder.position = #snapshot.text if placeholder.default then -- Execute any embedded code first. -- cgit v1.2.3