From 5fefa7a589c01e92b398eeb44700e0f6214cf0ea Mon Sep 17 00:00:00 2001
From: Jacek Lebioda <jacek.lebioda@uni.lu>
Date: Fri, 16 Jul 2021 09:46:16 +0000
Subject: [PATCH] fix: regex for email protection is less greedy now (it was
 matching one character too much in certain cases)

---
 _plugins/hook_email_protect.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_plugins/hook_email_protect.rb b/_plugins/hook_email_protect.rb
index a7d86ef3..62075a72 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) {
-- 
GitLab