Skip to content

Commit

Permalink
Use topic tags when logging from TermAttrsParser
Browse files Browse the repository at this point in the history
  • Loading branch information
skalee committed Mar 17, 2021
1 parent f6222f5 commit 0bcc873
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions lib/iev/termbase/term_attrs_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ def parse
extract_usage_info(curr_str)
extract_prefix(curr_str)

print_debug(curr_str) if debug?
if /\p{Word}/ =~ curr_str
debug(
:term_attributes,
"Term attributes could not be parsed completely: '#{src_str}'",
)
end
end

def extract_gender(str)
Expand Down Expand Up @@ -135,17 +140,6 @@ def remove_from_string(string, regexp)
$& # removed substring or nil
end
end

def print_debug(remaining_str)
if /\p{Word}/ =~ remaining_str
debug "Term attributes could not be parsed completely: " +
"'#{src_str}'"
end
end

def debug?
$TERMBASE_DEBUG[:term_attributes]
end
end
end
end

0 comments on commit 0bcc873

Please sign in to comment.