[TxMt] Re: Regex For Markdown Fenced Code Blocks
Allan Odgaard
mailinglist at textmate.org
Tue Feb 10 03:41:37 UTC 2015
On 10 Feb 2015, at 7:07, Robert J. Rockefeller wrote:
> I built this regex:
>
> { name = 'markup.raw.block.markdown';
> begin = '(^|\G)([`]{3})';
> end = '(^|\G)(^[`]{3})';
> },
Since you always want to match from begin-of-line they should probably
just be:
{ name = 'markup.raw.block.markdown';
begin = '^`{3}';
end = '^`{3}';
},
> Which hits the starting ``` but misses the ending one. Probably
> because it thinks the second one is the start of a new code block
> rather than the end of the last one.
I don’t see anything wrong here. Is there perhaps more in your actual
grammar that you left out of this email?
More information about the textmate
mailing list