Skip to content

add title_html field to doc and render code blocks #544

@LeoMcA

Description

@LeoMcA

content would like to add code blocks to titles using markdown backtick code syntax.

With a title like `<input>` HTML element the intended result would be:

In HTML contexts, to render the backticks out to HTML <code> blocks, e.g:

<h1><code>&gt;input&lt;</code> HTML element</h1>

In non-HTML contexts, to drop the backticks entirely, e.g.

<meta name="og:title" content="&lt;input&gt; HTML element" />

There may be existing logic to handle this sort of thing already, since we have mixed <code> element and text nodes in some sidebar titles.

It'll be the safest backwards-compatible change to introduce a new title_html field to render the <code> blocks in, and continue to use title (and pageTitle, and any other title-related fields we have...) for the plaintext no-backtick version.

We should also ensure there's an escaping mechanism, or we handle titles with no "closing" backtick, as there are already some titles including the character.

Metadata

Metadata

Assignees

Labels

p1We will address this soon and will provide capacity from our team for it in the next few releases.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions