Managed to reproduce! Create a comment including an emoji
James EJchanged title from {-Undefined method block? for nil:NilClass when viewing comment activity stream-} to Activity stream unable to display comments with emoji
changed title from {-Undefined method block? for nil:NilClass when viewing comment activity stream-} to Activity stream unable to display comments with emoji
@jamedjo Maybe? Still trying to reproduce. I am not able to reproduce by posting a emoji comment on an issue. Update: Ahh, post an emoji comment and visit the user profile (per the label).
I can reproduce when adding a test in gitlab_markdown_helper_spec.rb -> #first_line_in_markdown, text = "foo :wink:\n"
Should we have a null check on node.description in any case though?
I am not sure what is adding node.description or why it is a guranteed/expected. I don't see it in the Banzai codebase See Nokogiri parsing in truncate_visible and those gets passed into truncate_if_block
#description ⇒ Object
Fetch the Nokogiri::HTML::ElementDescription for this node. Returns nil on XML documents and on unknown tags.
Not sure why <gl-emoji> would be different from a <img> tag Per the error, node.element? is true for <gl-emoji> and node.description is nil. So either <img> gave node.element? false or was true and had a node.description.
<gl-emoji> has a nil description because it is a unknown tag
<img> gives a description with .block? being false