With the title carrying semantic information it may contain arbitrary chars;
when parsing a ref we only want word chars in the type (up to the first open
square bracket) and everything else, enclosed in "[" / "]" to the end of the
string, is the title.

Signed-off-by: Markus Roberts <[email protected]>
---
 lib/puppet/resource/catalog.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index 4ac99ee..9b5e68f 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -57,7 +57,7 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
   end
 
   def title_key_for_ref( ref )
-    ref =~ /^(.+)\[(.*)\]/m
+    ref =~ /^(\w+)\[(.*)\]$/m
     [$1, $2]
   end
 
-- 
1.6.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to