Make markup Raw, List, and ListItem inherit from Element - #1769
Merged
Conversation
Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
st0012
requested a deployment
to
fork-preview-protection
August 9, 2026 11:02 — with
GitHub Actions
Waiting
Contributor
There was a problem hiding this comment.
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::Rawinherit fromRDoc::Markup::Element. - Refactor
RDoc::Markup::ListandRDoc::Markup::ListItemto inherit fromElementand use themodule RDoc; class Markup; ...nesting style. - Add/standardize inline RBS type annotations and
@overridemarkers foraccept/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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
st0012
temporarily deployed
to
fork-preview-protection
August 9, 2026 11:12 — with
GitHub Actions
Inactive
Collaborator
|
🚀 Preview deployment available at: https://7c12fd51.rdoc-6cd.pages.dev (commit: 3974b74) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These classes are indeed markup components and already implement the Element contract, so they should inherit from the right abstract class.