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.)
Or perhaps the "--html4tags" option should just be used/not used automatically based on the value of TM_XHTML.
The current chunk of perl would probably be awkward to store in a variable or to use as a default value, but perhaps it could be made into a script in the Markdown bundle's support dir?
Just an idea. Thanks.
--- Rob McBroom http://www.skurfer.com/ I didn't "switch" to Apple... my OS did.
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.
On May 2, 2007, at 4:19 PM, Allan Odgaard wrote:
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.
Well, I was imagining the variable to contain the commands and arguments. So the default would be something like
Markdown.pl|SmartyPants.pl|another.pl
And then I would set the variable to something like
Markdown.pl --html4tags|another.pl
Is there a technical limitation that prevents this? Now that you mention it, it probably makes more sense to have a variable for each command, even if that makes things a bit messier.
The last line is cryptic, basically set TM_SMARTYPANTS to ‘cat’ to have SmartyPants.pl disabled.
It made sense to me, but thanks. :) And thanks for the changes to the bundle. I should be able to get the behavior I want now.
--- Rob McBroom http://www.skurfer.com/ I didn't "switch" to Apple... my OS did.
On 2. May 2007, at 22:52, Rob McBroom wrote:
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.
Well, I was imagining the variable to contain the commands and arguments. So the default would be something like
Markdown.pl|SmartyPants.pl|another.pl
And then I would set the variable to something like
Markdown.pl --html4tags|another.pl
Is there a technical limitation that prevents this? [...]
Yes, spaces in the path to Markdown.pl.
Say I set TM_MARKDOWN to ~/Library/Application Support/TextMate/ Support/bin/Markdown.pl And you set it to: Markdown.pl --html4tags
Both values have a space, in my case it is part of the path to markdown, in your case it is to separate the path and the arguments.