Skip to content

Support all valid HTML entities in HybridMarkdown - #1681

Merged
lsegal merged 1 commit into
mainfrom
1680-yard-documentation-tags-overview-are-showing-html-character-entities
May 4, 2026
Merged

Support all valid HTML entities in HybridMarkdown#1681
lsegal merged 1 commit into
mainfrom
1680-yard-documentation-tags-overview-are-showing-html-character-entities

Conversation

@lsegal

@lsegal lsegal commented May 4, 2026

Copy link
Copy Markdown
Owner

Fixes #1680

Copilot AI review requested due to automatic review settings May 4, 2026 23:22
@lsegal lsegal linked an issue May 4, 2026 that may be closed by this pull request

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 extends YARD’s built-in HybridMarkdown renderer so documentation pages can decode a much broader set of HTML named character references, addressing the entity-rendering problem reported in #1680 for docs like docs/Tags.md.

Changes:

  • Replaces the small hardcoded named-entity map in HybridMarkdown with a new vendored HtmlEntities table sourced from WHATWG entity names.
  • Updates entity decoding and NBSP handling to use the shared entity table.
  • Adds regression specs covering common named entities, newer HTML5-only names, and safe handling of angle-bracket entities.

Reviewed changes

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

File Description
spec/templates/helpers/markup/hybrid_markdown_spec.rb Adds focused regression tests for named-entity decoding behavior.
lib/yard/templates/helpers/markup/hybrid_markdown.rb Switches entity lookup and NBSP handling over to the new shared entity table.
lib/yard/templates/helpers/markup/html_entities.rb Adds the vendored HTML named-entity lookup table used by HybridMarkdown.
lib/yard/autoload.rb Registers the new HtmlEntities helper for autoloading.

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

Comment thread lib/yard/templates/helpers/markup/hybrid_markdown.rb
Comment thread spec/templates/helpers/markup/hybrid_markdown_spec.rb
@lsegal
lsegal merged commit bb515ae into main May 4, 2026
54 checks passed
@lsegal
lsegal deleted the 1680-yard-documentation-tags-overview-are-showing-html-character-entities branch May 4, 2026 23:28
lsegal added a commit that referenced this pull request May 25, 2026
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.

YARD documentation: Tags Overview are showing HTML character entities

2 participants