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 Sep 17, 2023
1 parent ec174eb commit fb6ff6f
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 fb6ff6f

Please sign in to comment.