[TxMt] Markdown bundle request

Allan Odgaard throw-away-1 at macromates.com
Wed May 2 20:19:25 UTC 2007

On 2. May 2007, at 20:57, Rob McBroom wrote:

> Could the Markdown bundle be modified to use a TM_MARKDOWN variable  
> (similar to the way the Subversion bundle uses TM_SVN) in the  
> "Convert document/selection to HTML" and other relevant commands?
> I envision that the variable would contain whatever command(s) you  
> want to use for Markdown stuff and would default to the current  
> "Markdown.pl|SmartyPants.pl|perl…".
> For example, I like to add the "--html4tags" option and get rid of  
> SmartyPants, but to do it currently, you need to modify the bundle.  
> (Which is fine in theory, but I worry that in practice, updates  
> will be missed.)

You wouldn’t be able to include your arguments in such variable. So  
either you would set the variable to a (custom) script, or we would  
instead need a TM_MARKDOWN_OPTIONS.

> Or perhaps the "--html4tags" option should just be used/not used  
> automatically based on the value of TM_XHTML.

Definitely that’s a good idea! I just made the following commit:

  • give --html4tags to Markdown.pl unless TM_XHTML is set and non-empty
  • use TM_SMARTYPANTS if set, instead of SmartyPants.pl (so set this  
to ‘cat’ to disable it)

The last line is cryptic, basically set TM_SMARTYPANTS to ‘cat’ to  
have SmartyPants.pl disabled.

More information about the textmate mailing list