Skip to content

Commit

Permalink
Org,optimizing: add an entra patter to the toplevel table for skippin…
Browse files Browse the repository at this point in the history
…gp lines starting from "#" earlyer

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Dec 27, 2022
1 parent b06058f commit 70de9e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions optlib/org.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ static void initializeOrgParser (const langType language)
addLanguageTagMultiTableRegex (language, "toplevel",
"^#\\+(NAME|name):[[:blank:]]+([[:graph:][:blank:]]+)([\n])?",
"\\2", "d", "", NULL);
addLanguageTagMultiTableRegex (language, "toplevel",
"^#[^\n]*\n",
"", "", "", NULL);
addLanguageTagMultiTableRegex (language, "toplevel",
"^(\\*{1,7})[ \t]+([[:graph:][:blank:]]+)([\n])?",
"", "", ""
Expand Down
2 changes: 2 additions & 0 deletions optlib/org.ctags
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
--_mtable-regex-Org=toplevel/#\+begin_src[ ]+([a-zA-Z0-9][-#+a-zA-Z0-9]*)//{tenter=srcblock}{_guest=\1,0end,}
# labels
--_mtable-regex-Org=toplevel/#\+(NAME|name):[[:blank:]]+([[:graph:][:blank:]]+)([\n])?/\2/d/
# skip #...
--_mtable-regex-Org=toplevel/#[^\n]*\n//
# sections stuff
--_mtable-regex-Org=toplevel/(\*{1,7})[ \t]+([[:graph:][:blank:]]+)([\n])?//{{
\2 kindTable \1 length 1 sub get @2 _tag _commit pop
Expand Down

0 comments on commit 70de9e4

Please sign in to comment.