Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Entry#contained?
Some applications, like BibDesk set the title and the booktitle to the same value. This would lead to a false positive when calling #contained?
  • Loading branch information
tmaier committed Jan 20, 2014
1 parent b3e05f6 commit 171983f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bibtex/entry.rb
Expand Up @@ -564,7 +564,8 @@ def pages_to

# Returns true if this entry is published inside a book, collection or journal
def contained?
has_field?(:booktitle, :container, :journal)
has_field?(:container, :journal) ||
has_field?(:booktitle) && get(:booktitle) != get(:title)
end

# Returns an array containing the values associated with the given keys.
Expand Down

0 comments on commit 171983f

Please sign in to comment.