Skip to content

Use prism to check if code is valid#1695

Merged
tompng merged 1 commit intoruby:masterfrom
Earlopain:parsable-with-prism
May 5, 2026
Merged

Use prism to check if code is valid#1695
tompng merged 1 commit intoruby:masterfrom
Earlopain:parsable-with-prism

Conversation

@Earlopain
Copy link
Copy Markdown
Contributor

@Earlopain Earlopain commented May 5, 2026

A bit nicer than what it currently does

A bit nicer than what it currently does
Copilot AI review requested due to automatic review settings May 5, 2026 13:30
@Earlopain Earlopain temporarily deployed to fork-preview-protection May 5, 2026 13:30 — with GitHub Actions Inactive
Copy link
Copy Markdown

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

This PR replaces RDoc::Markup::ToHtml#parseable?’s eval-based Ruby syntax check with Prism.parse_success?, so implicit Ruby code-block detection uses Prism instead of the interpreter parser.

Changes:

  • Add an explicit require 'prism' to the HTML formatter.
  • Replace the eval/SyntaxError check in parseable? with Prism.parse_success?.

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

false
ensure
$VERBOSE = verbose
Prism.parse_success?(text)
@matzbot
Copy link
Copy Markdown
Collaborator

matzbot commented May 5, 2026

🚀 Preview deployment available at: https://58feee03.rdoc-6cd.pages.dev (commit: f85b987)

@tompng tompng merged commit ca48251 into ruby:master May 5, 2026
44 of 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