Dear all,
I try to build a scope that matches a text block within a latex document. The beginning of a text block should be given by a line containing some text, which is preceded by a blank line (possibly filled with whitespace characters). Likewise, the end of a text block is a line containing some text followed by a blank line. So far I tried to put
{ name = 'meta.paragraph.text.latex'; begin = '\n[^\S\n]*\n[^\S\n]*(?=[^\S\n]*\S)'; end = '(?<=\S)[^\S\n]*\n[^\S\n]*\n'; },
inside the latex language definition, but this didn't work out (simply putting \n for both regexes works, but does the wrong thing). However, the beginning regepx matches the beginning of a text block, that is a line that is preceded by an empty line when I use it in the find window (and the same for the end of a text block). Can anybody tell me what I am doing wrong?
Perhaps there is another Scope already doing the job?
Best, Christoph