That would be soooo cool. Especially for people like me who spend way too much time making linking commands. I'd help you out, but honestly, I've never bothered to learn Markdown or Textile or anything other than HTML and XHTML.
Brett
On Nov 5, 2006, at 6:17 AM, Allan Odgaard wrote:
On 5. Nov 2006, at 12:07, Brett Terpstra wrote:
[ abstracting link creation ]
How do you mean?
Well, something like we make a function:
module LinkFactory module_function def create(url, link_text = url, title = "") case ENV['TM_SCOPE'] when /\btext.html.markdown\b/: "[#{link_text}](#{url})" when /\btext.html\b/: "<a href=\"#{url}\"#{" title=\"#{title}\"" unless
title.empty?}>#{link_text}</a>" when … … end end end
Then all the commands which generate links (wrap selection, lucky, wikipedia, link to blog post, etc.) use LinkFactory.create(…) and we just need one version which works nicely with both HTML, Markdown, Textile, and possibly other formats.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brett Terpstra : Art Director Circle Six Design, Inc. 111 Riverfront Dr, Suite 204 .................................................. p: 507.459.4398 877.858.4332 f: 1.866.540.3063 e: brett@circlesixdesign.com http://www.circlesixdesign.com ..................................................