Skip to content

Commit 660b8ac

Browse files
gzwongkkchertianser
authored andcommitted
Fix regex to limit keyword scope to fields (alshedivat#1629)
improved version of the original fix contributed by @paberr in alshedivat#1429
1 parent 9ece7e4 commit 660b8ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_plugins/hideCustomBibtex.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def hideCustomBibtex(input)
44
keywords = @context.registers[:site].config['filtered_bibtex_keywords']
55

66
keywords.each do |keyword|
7-
input = input.gsub(/^.*#{keyword}.*$\n/, '')
7+
input = input.gsub(/^.*\b#{keyword}\b *= *\{.*$\n/, '')
88
end
99

1010
return input

0 commit comments

Comments
 (0)