From 56d8e65573d54069713b8bff5db309bfffe942c4 Mon Sep 17 00:00:00 2001 From: Alex Manoel Ferreira Silva Date: Wed, 1 Jul 2020 20:21:29 -0300 Subject: [PATCH] fix(generator): links with title without fragment Corrects the regex that separates fragments leaving it optional. --- lib/jekyll-relative-links/generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll-relative-links/generator.rb b/lib/jekyll-relative-links/generator.rb index 4edc6f1..d4b3f00 100644 --- a/lib/jekyll-relative-links/generator.rb +++ b/lib/jekyll-relative-links/generator.rb @@ -8,7 +8,7 @@ class Generator < Jekyll::Generator include Jekyll::Filters::URLFilters LINK_TEXT_REGEX = %r!(.*?)!.freeze - FRAGMENT_REGEX = %r!(#.+?)?!.freeze + FRAGMENT_REGEX = %r!(#.+?|)?!.freeze TITLE_REGEX = %r{(\s+"(?:\\"|[^"])*(?