Skip to content

Add a "malformed comment" check for top-level comments#145

Merged
kou merged 2 commits intoruby:masterfrom
makenowjust:toplevel-comment-check
Jun 13, 2024
Merged

Add a "malformed comment" check for top-level comments#145
kou merged 2 commits intoruby:masterfrom
makenowjust:toplevel-comment-check

Conversation

@makenowjust
Copy link
Copy Markdown
Contributor

@makenowjust makenowjust commented Jun 12, 2024

This check was missing. Therefore, REXML::Document.new("<!--") raised the undefined method `[]' for nil error, for example.

This PR also adds tests for "malformed comment" checks.

This check was missing. Therefore, `Document.new("<!--")`
raises the `undefined method `[]' for nil` error, for example.

This also adds tests for "malformed comment" checks.
Comment thread lib/rexml/parsers/baseparser.rb Outdated
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@kou kou merged commit b5bf109 into ruby:master Jun 13, 2024
@kou
Copy link
Copy Markdown
Member

kou commented Jun 13, 2024

Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants