Skip to content

Use prism to check if code is valid - #1695

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

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

Conversation

@Earlopain

@Earlopain Earlopain commented May 5, 2026

Copy link
Copy Markdown
Contributor

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

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 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

matzbot commented May 5, 2026

Copy link
Copy Markdown
Collaborator

🚀 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