I’m trying to create a syntax definition for the Creole wiki markup language. I’m having trouble creating a regex to recognise preformatted blocks. The section of the syntax definition pertaining to these, as well as to inline preoformatted section is as follows:
# Nowiki
- match: '^({{{)\s*(?=\n(?:.*\n)*}}})'
captures:
1: punctuation.definition.raw.creole
push: nowiki-block
- match: '({{{)(?=.*}}})'
captures:
1: punctuation.definition.raw.creole
push: nowiki-inline
Inline sections are recognised perfectly well but blocks are not. The strange thing is that the regex for blocks appears to work as expected if used in the find bar. Any help would be much appreciated.