Skip to content

Commit

Permalink
Fix broken HTML lists with grep
Browse files Browse the repository at this point in the history
  • Loading branch information
lewispb committed Dec 18, 2024
1 parent 7d59a92 commit aabb02e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cognition/plugins/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def filter(full_response)

filter = filter.sub(/^grep\s*/, "")

full_response.each_line.select { |line| line.downcase.include? filter.downcase }.join
full_response.each_line.select do |line|
line.downcase.include?(filter.downcase) ||
line.downcase.include?("ul>") # Don't strip wrapping ul tags
end.join
end
end
end
Expand Down

0 comments on commit aabb02e

Please sign in to comment.