On 7 January 2016 at 14:00, Mike McQuaid mike@mikemcquaid.com wrote:
Hi!
I’m trying to match the triple-backticks raw block Markdown extension e.g.:
this is a raw block
I’m using the following pattern:
{ name = 'markup.raw.block.markdown'; begin = '(^|\G)([`~]{3,})'; end = '(^|\G)([`~]{3,})'; beginCaptures = { 2 = { name = 'punctuation.definition.raw.markdown'; }; }; },
Unfortunately this just seems to never “end” and just matches the “begin” repeatedly.
Interesting, that does work for me.
For completeness sake, this is in the grammar repository:
raw_block = { patterns = ( { name = 'markup.raw.block.markdown'; begin = '(^|\G)([ ]{4}|\t)'; while = '(^|\G)([ ]{4}|\t)'; }, { name = 'markup.raw.block.fenced.markdown'; begin = '(^|\G)([`~]{3,})'; end = '(^|\G)([`~]{3,})'; beginCaptures = { 2 = { name = 'punctuation.definition.raw.markdown'; }; }; }, ); };
and I tested with this snippet of text:
This is some text
This is a raw block
``` This is another raw block ```
This is some more text
Both raw blocks are recognized as such, as are both paragraphs.
Is your TextMate up to date? (2.0-beta.8.5 is the latest "normal" release.) Have you made any other modifications to your Markdown bundle?
Sorry, Martin
Does anyone have any suggestions here?
Thanks!
Mike McQuaid http://mikemcquaid.com
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate