diff --git a/_plugins/hook_email_protect.rb b/_plugins/hook_email_protect.rb index a7d86ef3c94db8c15eec9bbdba40b731bf7ba270..62075a722994c49c20b62e32a2f172c47e5c989c 100644 --- a/_plugins/hook_email_protect.rb +++ b/_plugins/hook_email_protect.rb @@ -5,7 +5,7 @@ Jekyll::Hooks.register([:pages, :posts, :documents], :pre_render) do |post| include Jekyll::EmailProtect::EmailProtectionFilter # Using a simpler version of email regexp - email_regexp = /mailto\:(?:[\'\"]*)(?:[\w+\-]\.?)+@[a-z\d\-]+(?:\.[a-z]+)*\.[a-z]+(?:[\'\"]*)/i + email_regexp = /mailto\:(?:[\w+\-]\.?)+@[a-z\d\-]+(?:\.[a-z]+)*\.[a-z]+/i # Take post's content, and transform every occurence of the following regexp (an email) post.content = post.content.gsub(email_regexp) {