From: Ralf Jung Date: Thu, 8 Oct 2015 15:24:22 +0000 (+0200) Subject: make sure we extract something sensible as slug from the readmes X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/28de6b028ff4a365bd802d4af9fcba76eb154c0e?ds=sidebyside make sure we extract something sensible as slug from the readmes --- diff --git a/_plugins/readmes.rb b/_plugins/readmes.rb index 82f917f..6b8c80e 100644 --- a/_plugins/readmes.rb +++ b/_plugins/readmes.rb @@ -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