From 89b88c2c41b38994b9e87520265bed9de002e5c4 Mon Sep 17 00:00:00 2001 From: Shane Becker Date: Tue, 28 Jun 2011 21:28:47 -0700 Subject: [PATCH] pull url from tag content if there is no href --- lib/microformats2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/microformats2.rb b/lib/microformats2.rb index 4c994ed..75f0f9f 100644 --- a/lib/microformats2.rb +++ b/lib/microformats2.rb @@ -66,7 +66,7 @@ module Microformats2 class URL def transform(property) - property.attribute("href").to_s + (property.attribute("href") || property.text).to_s end end