diff --git a/lib/ctags-config b/lib/ctags-config index 2172784..f54959f 100644 --- a/lib/ctags-config +++ b/lib/ctags-config @@ -90,10 +90,14 @@ --regex-perl=/^\=head2[ \t]+(.+)/-- \1/p,pod,Plain Old Documentation/ --regex-perl=/^\=head[3-5][ \t]+(.+)/---- \1/p,pod,Plain Old Documentation/ ---regex-JavaScript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]*\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/ ---regex-JavaScript=/function[ \t]+([A-Za-z0-9_$]+)[ \t]*\([^)]*\)/\1/,function/ +--JavaScript-kinds=-pf +--regex-JavaScript=/(,|(;|^)[ \t]*(var|let|const|([A-Za-z_$][A-Za-z0-9_$.]*\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/ +--regex-JavaScript=/(,|^|\*\/)[ \t]*function[ \t]+([A-Za-z0-9_$]+)[ \t]*\([^)]*\)/\2/,function/ +--regex-JavaScript=/(,|^|\*\/)[ \t]*static[ \t]+([A-Za-z0-9_$]+)[ \t]*=/\2/,variable/ +--regex-JavaScript=/(,|^|\*\/|export|export default)[ \t]*class[ \t]+([A-Za-z0-9._$]+)[ \t]*/\2/,class/ --regex-JavaScript=/(,|^|\*\/)[ \t]*([A-Za-z_$][A-Za-z0-9_$]+)[ \t]*:[ \t]*function[ \t]*\(/\2/,function/ ---regex-JavaScript=/(,|^|\*\/)[ \t]*(static[ \t]+)?(while|if|for|function|([A-Za-z_$][A-Za-z0-9_$]+))[ \t]*\([^)]*\)[ \t]*\{/\2\4/,function/ +--regex-JavaScript=/([A-Za-z0-9_$]+)[ \t]*[=:][ \t]*\([^)]*\)[ \t]*=>/\1/,function/ +--regex-JavaScript=/(,|^|\*\/)[ \t]*(static[ \t]+)?(while|if|for|function|([A-Za-z_$][A-Za-z0-9_$]+))[ \t]*\([^)]*\)[ \t]*\{/\4/,function/ --regex-JavaScript=/(,|^|\*\/)[ \t]*get[ \t]+([A-Za-z_$][A-Za-z0-9_$]+)[ \t]*\([ \t]*\)[ \t]*\{/get \2/,function/ --regex-JavaScript=/(,|^|\*\/)[ \t]*set[ \t]+([A-Za-z_$][A-Za-z0-9_$]+)[ \t]*\([ \t]*([A-Za-z_$][A-Za-z0-9_$]+)?[ \t]*\)[ \t]*\{/set \2/,function/ --regex-JavaScript=/(,|^|\*\/)[ \t]*async[ \t]+([A-Za-z_$][A-Za-z0-9_$]+)[ \t]*\([ \t]*([A-Za-z_$].+)?[ \t]*\)[ \t]*\{/\2/,function/ diff --git a/lib/symbols-view.coffee b/lib/symbols-view.coffee index 697cfaa..12571e0 100644 --- a/lib/symbols-view.coffee +++ b/lib/symbols-view.coffee @@ -98,8 +98,8 @@ class SymbolsView extends SelectListView @focusFilterEditor() getTagLine: (tag) -> - # Remove leading /^ and trailing $/ - pattern = tag.pattern?.replace(/(^^\/\^)|(\$\/$)/g, '').trim() + # Remove leading /^ , trailing $/ , and escape char (\) + pattern = tag.pattern?.replace(/(^^\/\^)|(\$\/$)|(\\)/g, '').trim() return unless pattern file = path.join(tag.directory, tag.file)