aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-02-13 02:16:57 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2011-02-13 02:16:57 -0500
commitd6056c9b83a3c90cd406a805f38d25406315ca81 (patch)
treeabe80909742bf665626452eda6656e56e41d5f82 /modules
parentd5b4208dcce0e8d092ca0a74bf765ca6cd4e0802 (diff)
downloadtextadept-d6056c9b83a3c90cd406a805f38d25406315ca81.tar.gz
textadept-d6056c9b83a3c90cd406a805f38d25406315ca81.zip
Handle \\n sequences properly in apidoc; modules/textadept/adeptsense.lua
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/adeptsense.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index c1b82147..4786360d 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -220,7 +220,7 @@ function show_apidoc(sense)
local apidocs = sense:get_apidoc(symbol)
if not apidocs then return false end
for i, doc in ipairs(apidocs) do
- doc = doc:gsub('\\\\', '%%esc%%'):gsub('\\n', '\n'):gsub('%%esc%%', '\\')
+ doc = doc:gsub('([^\\])\\n', '%1\n'):gsub('\\\\n', '\\n')
if #apidocs > 1 then
if not doc:find('\n') then doc = doc..'\n' end
doc = '\001'..doc:gsub('\n', '\n\002', 1)