Skip to content

Language tabs break if highlight shortcodes are not adjacent. #21030

@damccorm

Description

@damccorm

If adjacent \< highlight >`` shortcodes have an extra return between them, it breaks the language switcher tabs. This appears to be happening because the Markdown parser generates empty <p\> tags for the return. This doesn't happen in all circumstances. It seems to happen if the first shortcode is preceded by a text element and no return. The jQuery in language-switch-v2.js doesn't expect the `<p>` tags, and the CSS probably doesn't either.

It may be possible to fix this by removing <p\> tags. We shouldn't touch the Hugo markdown parser or builtin shortcodes.

 

 

Imported from Jira BEAM-12688. Original Jira may contain additional context.
Reported by: pcoet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions