aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/adeptsense.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-02-25 17:04:11 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2011-02-25 17:04:11 -0500
commit6b9d51dea8066e8614517d7dffe2c1755a585b4a (patch)
tree38c245b9c4367b5a22257484d5c1eecbd552f1d5 /modules/textadept/adeptsense.lua
parent95b9561fd510ae868288ca12f14d666d11052111 (diff)
downloadtextadept-6b9d51dea8066e8614517d7dffe2c1755a585b4a.tar.gz
textadept-6b9d51dea8066e8614517d7dffe2c1755a585b4a.zip
Escape pattern chars when searching apidoc; modules/textadept/adeptsense.lua
Diffstat (limited to 'modules/textadept/adeptsense.lua')
-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 63282680..52569d6e 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -542,7 +542,7 @@ function get_apidoc(sense, symbol, raw)
local entity, func = symbol:match('^(.-)[^%w_]*([%w_]+)$')
if raw then entity, func = '', symbol end
local c = func:sub(1, 1) -- for quick comparison
- local patt = '^'..func..'%s+(.+)$'
+ local patt = '^'..func:gsub('([%.%-])', '%%%1')..'%s+(.+)$'
for _, file in ipairs(sense.api_files) do
if lfs.attributes(file) then
for line in io.lines(file) do