mirror of
https://github.com/python/cpython.git
synced 2024-11-29 21:05:33 +08:00
(py-imenu-create-index-function): Skip over stuff that looks like code
but which is in a comment or string. Closes SF bug # 572341 reported by Adrian van den Dries.
This commit is contained in:
parent
5086e49a6e
commit
32a03967b7
@ -945,6 +945,8 @@ of the first definition found."
|
||||
;; what level is the next definition on? must be same, deeper
|
||||
;; or shallower indentation
|
||||
(cond
|
||||
;; Skip code in comments and strings
|
||||
((py-in-literal))
|
||||
;; at the same indent level, add it to the list...
|
||||
((= start-indent cur-indent)
|
||||
(push (cons def-name def-pos) index-alist))
|
||||
|
Loading…
Reference in New Issue
Block a user