I would like to adapt this syntax file so that the formatting in VIM matches more closely what this online Markdown editor (GitLab-flavor) displays (the output on the right is relevant, this is how I want the text to look in VIM). In particular, I am looking at the detection of italics triggered by framing text with asterisks.
I made some progress by simplifying the start and end patterns and by adding "oneline". But actually I would like the region to extend beyond a single line to an entire paragraph. In other words, the region should include subsequent lines until an empty line is encountered. If I omit the "oneline" attribute, the region just goes on and does not stop on an empty line. How can I make this region include subsequent non-empty lines but stop at the first empty line (or, obviously, the end pattern, whatever comes first)?
Note that a piece of text that contains the start pattern, but no end pattern and that is terminated by an empty line should NOT be detected as a region. The empty line is not an alternative end, it should just be interpreted as "stop looking here for the end pattern".
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\*\S\@=" end="\S\@<=\*" keepend oneline contains=markdownLineStart' . s:concealends