DEV: Update code comment wording (#22861)

Follow up to: a8c504aee4

See: https://github.com/discourse/discourse/pull/22829#discussion_r1277747036
This commit is contained in:
Blake Erickson 2023-07-28 11:47:22 -06:00 committed by GitHub
parent 891aabde19
commit 274c3c9396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ class ExcerptParser < Nokogiri::XML::SAX::Document
when "div", "span" when "div", "span"
attributes = Hash[*attributes.flatten] attributes = Hash[*attributes.flatten]
# Only match "excerpt" class if it does specifically equal "excerpt # Only match "excerpt" class if it does not specifically equal "excerpt
# hidden" in order to prevent internal links with GitHub oneboxes from # hidden" in order to prevent internal links with GitHub oneboxes from
# being empty https://meta.discourse.org/t/269436 # being empty https://meta.discourse.org/t/269436
if attributes["class"]&.include?("excerpt") && !attributes["class"]&.match?("excerpt hidden") if attributes["class"]&.include?("excerpt") && !attributes["class"]&.match?("excerpt hidden")