[PATCH] tagz-5.0.0

A

Andrew S. Townley

Hi Ara,

Here's a fix for the empty tag problem. With this fix, I now have a
usable solution. It would still be nice to support combining multiple
hash arguments automatically, but that's not a showstopper.

Thanks again for all your hard work.

Cheers,

ast

excalibur$ diff -u /var/lib/gems/1.8/gems/tagz-5.0.0/lib/tagz.rb /tmp/tagz.rb
--- /var/lib/gems/1.8/gems/tagz-5.0.0/lib/tagz.rb 2009-03-24 11:58:05.000000000 +0000
+++ /tmp/tagz.rb 2009-03-27 13:21:47.000000000 +0000
@@ -37,6 +37,7 @@
end

tagz.concat "<#{ name }#{ attributes }>"
+ startsz = tagz.size

if content.empty?
if block
@@ -59,6 +60,7 @@
tagz.concat "</#{ name }>"
end

+ tagz[-1] = "/>" if tagz.size == startsz
tagz
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top