From bibiko@eva.mpg.de Fri Nov 23 22:32:59 2007 From: =?utf-8?q?Hans-J=C3=B6rg?= Bibiko To: textmate@lists.macromates.com Subject: [TxMt] Tiny bug in HTML Bundle command "Insert Close Tag" Date: Fri, 23 Nov 2007 23:32:48 +0100 Message-ID: <00E77412-A76C-48E1-9575-0B241155D0E4@eva.mpg.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7747338314007256889==" --===============7747338314007256889== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Hi, I encountered a tiny bug in the Ruby code for: "Insert Close Tag" If one has he following HTML code: foo
and press OPT+APPLE+. it will insert not . The reason is here: # remove all self-closing tags if ENV.has_key?('TM_HTML_EMPTY_TAGS') then empty_tags = ENV['TM_HTML_EMPTY_TAGS'] before.gsub!(/<(#{empty_tags})\b[^>]*>/, '') end The regexp is not case insensitive! TM_HTML_EMPTY_TAGS are written in lower case only. Ergo: # remove all self-closing tags if ENV.has_key?('TM_HTML_EMPTY_TAGS') then empty_tags = ENV['TM_HTML_EMPTY_TAGS'] before.gsub!(/<(#{empty_tags})\b[^>]*>/i, '') end Cheers, --Hans --===============7747338314007256889==-- From bundles@textmate.org Sat Nov 24 08:49:17 2007 From: Michael Sheets To: textmate@lists.macromates.com Subject: Re: [TxMt] Tiny bug in HTML Bundle command "Insert Close Tag" Date: Sat, 24 Nov 2007 02:47:19 -0600 Message-ID: In-Reply-To: <00E77412-A76C-48E1-9575-0B241155D0E4@eva.mpg.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4532517412943507751==" --===============4532517412943507751== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Nov 23, 2007, at 4:32 PM, Hans-Jörg Bibiko wrote: > I encountered a tiny bug in the Ruby code for: "Insert Close Tag" > > If one has he following HTML code: > > foo >
> > and press OPT+APPLE+. it will insert not . Change committed, thanks! -- Michael Sheets TextMate Bundles Moderator – bundles(a)textmate.org --===============4532517412943507751==--