Hi,
I encountered a tiny bug in the Ruby code for: "Insert Close Tag"
If one has he following HTML code:
<HTML><HEAD><TITLE>foo</TITLE></HEAD><BODY> <HR>
and press OPT+APPLE+. it will insert </HR> not </BODY>.
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
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:
<HTML><HEAD><TITLE>foo</TITLE></HEAD><BODY> <HR>
and press OPT+APPLE+. it will insert </HR> not </BODY>.
Change committed, thanks!