From 274c3c93966d9f7fffd0b7d2a9a882bf66d160c2 Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Fri, 28 Jul 2023 11:47:22 -0600 Subject: [PATCH] DEV: Update code comment wording (#22861) Follow up to: a8c504aee43f2b5589fe6fe3af14012983c393e6 See: https://github.com/discourse/discourse/pull/22829#discussion_r1277747036 --- lib/excerpt_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/excerpt_parser.rb b/lib/excerpt_parser.rb index 5d9c9cabe31..0811cb3129a 100644 --- a/lib/excerpt_parser.rb +++ b/lib/excerpt_parser.rb @@ -115,7 +115,7 @@ class ExcerptParser < Nokogiri::XML::SAX::Document when "div", "span" 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 # being empty https://meta.discourse.org/t/269436 if attributes["class"]&.include?("excerpt") && !attributes["class"]&.match?("excerpt hidden")