aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2015-10-07 09:23:22 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2015-10-07 09:23:22 -0400
commita7d479becd5b94e92e11552dacf51c31abcbcae4 (patch)
treeee896a20b7310161e6aa51d9968b184023311d4f
parent240b5973e947b83013b80e5c7ea820cc08405560 (diff)
downloadtextadept-a7d479becd5b94e92e11552dacf51c31abcbcae4.tar.gz
textadept-a7d479becd5b94e92e11552dacf51c31abcbcae4.zip
Fixed '%' escape sequences in snippets; modules/textadept/snippets.lua
-rw-r--r--modules/textadept/snippets.lua4
1 files changed, 3 insertions, 1 deletions
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.