Skip to content

Commit

Permalink
Fix regex to limit keyword scope to fields (alshedivat#1629)
Browse files Browse the repository at this point in the history
improved version of the original fix contributed by @paberr in alshedivat#1429
  • Loading branch information
gzwongkk authored and smeznar committed Dec 9, 2023
1 parent 0dee1bc commit 7ef6699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _plugins/hideCustomBibtex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def hideCustomBibtex(input)
keywords = @context.registers[:site].config['filtered_bibtex_keywords']

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

return input
Expand Down

0 comments on commit 7ef6699

Please sign in to comment.