Sublime Forum

Recursion into beginCaptures

#1

Hi,

I’m trying to improve a network syntax plugin and I have a bit of the problem with recursion inside the beginCaptures :

Here the text :

banner motd #
---------------------------------------------------------------------------------
 This system uses configuration synchronization between its pair. Pay attention!
---------------------------------------------------------------------------------
#

As you see the # # is kind of a heredoc syntax preceeded by two keywords match by other rules.

Here my syntax :

{ "name": "string.quoted.network",
   "begin": (?!\\s*\\d+\\s+)(.*)#$",
   "end": "^#$"
}

Now that I have that I would like to re-apply all my rules to the content of the 2nd capture of my begin.

How can I do that ?

Regards.

0 Likes

#2

sublime-text-unofficial-document … xdefs.html might help.

0 Likes

#3

If you are refering to ‘{ “include”: “$self” }’ it seems that it only applies to the content of the capture, not to the begin or end content.

0 Likes