Do not print a string that has no tag.
This matches the README description. We really want to encourage users to use tags. Otherwise it becomes easy to accidentally have a string go to too many destination files.
This commit is contained in:
parent
b5ab3249a9
commit
2daebb750e
1 changed files with 6 additions and 5 deletions
|
@ -23,12 +23,13 @@ module Twine
|
|||
end
|
||||
|
||||
def matches_tags?(tags)
|
||||
# The user did not specify any tags. Everything passes.
|
||||
if tags == nil || tags.length == 0
|
||||
if @tags == nil || @tags.length == 0
|
||||
# This row has no tags. Never match
|
||||
return false
|
||||
elsif tags == nil || tags.length == 0
|
||||
# The user did not specify any tags. Everything passes.
|
||||
return true
|
||||
end
|
||||
|
||||
if tags != nil && @tags != nil
|
||||
else
|
||||
tags.each do |tag|
|
||||
if @tags.include? tag
|
||||
return true
|
||||
|
|
Reference in a new issue