Skip to content

Fix unused variable warning in generated markdown parser#1708

Merged
tompng merged 1 commit into
ruby:masterfrom
tompng:markdown_fix_warn
May 12, 2026
Merged

Fix unused variable warning in generated markdown parser#1708
tompng merged 1 commit into
ruby:masterfrom
tompng:markdown_fix_warn

Conversation

@tompng
Copy link
Copy Markdown
Member

@tompng tompng commented May 12, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 12, 2026 12:41
@tompng tompng temporarily deployed to fork-preview-protection May 12, 2026 12:41 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unused-local-variable warning emitted by the generated Markdown parser by updating the StrippedComment grammar rule to stop capturing matched text that is never referenced.

Changes:

  • Updated StrippedComment rule to remove the < ... > text-capture wrapper while keeping the same match behavior.
  • Regenerated/updated the corresponding Ruby parser method to eliminate the now-unneeded _text_start/text assignments.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/rdoc/markdown.kpeg Updates the StrippedComment grammar rule to avoid capturing unused text.
lib/rdoc/markdown.rb Reflects the grammar change in the generated parser code and rule metadata, removing the unused variable assignment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@matzbot
Copy link
Copy Markdown
Collaborator

matzbot commented May 12, 2026

🚀 Preview deployment available at: https://833b4136.rdoc-6cd.pages.dev (commit: 003c83e)

@tompng tompng merged commit 4806de9 into ruby:master May 12, 2026
45 checks passed
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.

4 participants