Skip to content

Render emphasis, subscripts, and superscripts as semantic HTML - #569

Merged
mflatt merged 1 commit into
racket:masterfrom
slbls:semantic-inline-html
Aug 8, 2026
Merged

Render emphasis, subscripts, and superscripts as semantic HTML#569
mflatt merged 1 commit into
racket:masterfrom
slbls:semantic-inline-html

Conversation

@slbls

@slbls slbls commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

While adapting The Racket Guide to EPUB 3 for myself locally (reading using Apple Books), I noticed that Scribble renders @emph, @superscript, and @subscript as styled <span> elements.

Render them as <em>, <sup>, and <sub>. Keep class="emph" and the current subscript and superscript presentation. Add line-height: inherit to preserve the existing line-box behavior. Explicit alt-tag values, links, and custom string styles retain their current behavior.

This follows PR #220, which made @emph logical and nestable. Its discussion proposed <em> output and identified the HTML renderer as the implementation point. That PR already added Markdown support.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 2 files in this pull request and found no issues.

@mflatt
mflatt merged commit 5b65854 into racket:master Aug 8, 2026
2 checks passed
@mflatt

mflatt commented Aug 8, 2026

Copy link
Copy Markdown
Member

Thanks!

@slbls
slbls deleted the semantic-inline-html branch August 8, 2026 21:38
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.

2 participants