[TxMt] Re: Supporting YAML front matter in Markdown

Allan Odgaard mailinglist at textmate.org
Sat Jul 16 20:46:53 UTC 2016

On 16 Jul 2016, at 22:35, Stefan Daschek wrote:

> Maybe we could introduce something like |TM_MARKDOWN_PREPROCESSOR| 
> into the existing preview commands? With the idea that as long as this 
> is not set (the default) it does nothing, but if it is set the 
> document gets piped through this first before being processed further.

This sounds fine to me, however, this should probably be a list.

So your bundle would contain:

	{	shellVariables = (
			{	name = 'TM_MARKDOWN_FILTER';
				value = '$TM_BUNDLE_SUPPORT/strip-frontmatter:$TM_MARKDOWN_FILTER';

And the preview command would have to do a “split” and run each 
(non-empty) filter.

This could be exploited by users as well, for example I could set 
`TM_MARKDOWN_FILTER` to something that generates table-of-contents or 
enumerate the headings etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160716/be7dba88/attachment.html>

More information about the textmate mailing list