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 82f917f..6b8c80e 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