xref: /Universal-ctags/optlib/iPythonCell.ctags (revision eb8ac46574f4815b08604eff66417a522d20fd01)
1#
2#  iPythonCell.ctags --- a parser for python with IPythonCell comments
3#
4#  Copyright (c) 2021 Masatake YAMATO
5#  Copyright (c) 2021 Red Hat, Inc.
6#
7#  This source code is released for free distribution under the terms of the
8#  GNU General Public License version 2 or (at your option) any later version.
9#
10# References:
11#
12# - https://github.com/hanschen/vim-ipython-cell
13#
14# `##' cell format is disabled by default because it can cause too much
15# false-positive tagging. Use `--extras-IPythonCell=+{doubleSharps}'
16# to enable it.
17#
18--langdef=IPythonCell{base=Python}
19--kinddef-IPythonCell=c,cell,cells
20--_extradef-IPythonCell=doubleSharps,Include cells starting from ##
21
22--regex-IPythonCell=/^[ \t]*(# ?%%|# <codecell>)[ \t]*(.*[^ \t])$/\2/c/{exclusive}
23--regex-IPythonCell=/^[ \t]*##[ \t]*(.*[^ \t])$/\1/c/{_extra=doubleSharps}{exclusive}
24