Skip to content

Emitting inline backticks with core.summary does not render code elements #2109

@jasonkarns

Description

@jasonkarns

Describe the bug
I'm trying to print some paragraph text, including inline code snippets (not code blocks).

eg

Bumping formula `something` in `custom/tap` to `v1.2.3`. 

which should render on the summary as:

Image

To Reproduce
Steps to reproduce the behavior:
Printing to summary file:

import { summary } from '@actions/core'
summary.addRaw(`Bumping formula \`${formulaName}\` in \`${owner}/${repo}\` to \`${tagName}\`. `)

When run in a workflow, the resulting summary instead contains literal backticks.

Expected behavior
I would expect the inline code backticks to be escaped by the JS template literal and thus passed to github's markdown renderer directly, thus rendering as <code> elements.

Screenshots

Image

Desktop (please complete the following information):

  • OS: macos
  • Browser safari
  • Version 18.5

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions