Fix regex to limit keyword scope to fields (#1629)

improved version of the original fix contributed by @paberr in #1429
This commit is contained in:
gzwongkk 2023-09-18 02:19:45 +08:00 committed by GitHub
parent 482f4366bb
commit 53ad434ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
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