Skip to content

Make markup Raw, List, and ListItem inherit from Element - #1769

Merged
tompng merged 4 commits into
ruby:masterfrom
st0012:codex/raw-inherits-element
Aug 9, 2026
Merged

Make markup Raw, List, and ListItem inherit from Element#1769
tompng merged 4 commits into
ruby:masterfrom
st0012:codex/raw-inherits-element

Conversation

@st0012

@st0012 st0012 commented Aug 9, 2026

Copy link
Copy Markdown
Member

These classes are indeed markup components and already implement the Element contract, so they should inherit from the right abstract class.

st0012 and others added 3 commits August 8, 2026 17:58
Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
Copilot AI lite review requested due to automatic review settings August 9, 2026 11:02
@st0012
st0012 requested a deployment to fork-preview-protection August 9, 2026 11:02 — with GitHub Actions Waiting

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns RDoc::Markup::Raw, RDoc::Markup::List, and RDoc::Markup::ListItem with the markup element hierarchy by making them inherit from RDoc::Markup::Element, matching the existing visitor/pretty-print contract used throughout RDoc::Markup.

Changes:

  • Make RDoc::Markup::Raw inherit from RDoc::Markup::Element.
  • Refactor RDoc::Markup::List and RDoc::Markup::ListItem to inherit from Element and use the module RDoc; class Markup; ... nesting style.
  • Add/standardize inline RBS type annotations and @override markers for accept/pretty_print.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lib/rdoc/markup/raw.rb Raw now inherits from Element to formally satisfy the markup element interface.
lib/rdoc/markup/list.rb List now inherits from Element and modernizes structure/type annotations while preserving visitor behavior.
lib/rdoc/markup/list_item.rb ListItem now inherits from Element and modernizes structure/type annotations while preserving visitor behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/rdoc/markup/raw.rb Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 9, 2026 11:12
@st0012
st0012 temporarily deployed to fork-preview-protection August 9, 2026 11:12 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

@matzbot

matzbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

🚀 Preview deployment available at: https://7c12fd51.rdoc-6cd.pages.dev (commit: 3974b74)

@tompng tompng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@tompng
tompng merged commit c1a1d89 into ruby:master Aug 9, 2026
30 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