make sure we extract something sensible as slug from the readmes
authorRalf Jung <post@ralfj.de>
Thu, 8 Oct 2015 15:24:22 +0000 (17:24 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 8 Oct 2015 15:24:22 +0000 (17:24 +0200)
_plugins/readmes.rb

index 82f917f18e1c32597d61849d113f33abb93da559..6b8c80e97616c3fabea86f700ffc2ce6269adbd3 100644 (file)
@@ -14,7 +14,7 @@ module Jekyll
 
       self.data['layout'] = 'default'
       self.data['title'] = content[0].match(/^#* ?(.*)\n$/)[1]
-      slug = self.data['title'].match(/^(.*):.*$/)
+      slug = self.data['title'].match(/^([^:]*):.*$/)
       if slug
         self.data['slug'] = slug[1]
       end