Support all valid HTML entities in HybridMarkdown - #1681
Merged
lsegal merged 1 commit intoMay 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
HybridMarkdownwith a new vendoredHtmlEntitiestable 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.
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
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.
Fixes #1680