Skip to content

fix(ansi): keep enclosing style on inline code spans - #585

Open
larrasket wants to merge 1 commit into
charmbracelet:mainfrom
larrasket:fix/inline-code-emphasis-style
Open

fix(ansi): keep enclosing style on inline code spans#585
larrasket wants to merge 1 commit into
charmbracelet:mainfrom
larrasket:fix/inline-code-emphasis-style

Conversation

@larrasket

Copy link
Copy Markdown

CodeSpanElement didn't implement StyleOverrideRender, an inline code span nested inside emphasis or strong lost the surrounding style and rendered without italics or bold. this add StyleOverrideRender so the enclosing style cascades onto the code span

Fixes #80

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).

CodeSpanElement didn't implement StyleOverrideRender, so an inline code
span nested inside emphasis or strong lost the surrounding style and
rendered without italics or bold.

Add StyleOverrideRender so the enclosing style cascades onto the code span,
the same way BaseElement and EmphasisElement already do.

The four regenerated table goldens only drop a redundant no-op escape
sequence around code spans; the rendered output is unchanged.

Fixes charmbracelet#80
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.

Inline code in italics is rendered without inline code style

1 participant