diff --git a/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml b/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml index fc4fd0197..96e7bbc61 100644 --- a/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml +++ b/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml @@ -145,14 +145,7 @@ var lifecycleClass = applicability.GetLifeCycleName().ToLowerInvariant().Replace(" ", "-"); - @if (name == "Elastic Stack") - { - @badgeText - } - else - { @name - } @if (applicability.Lifecycle != ProductLifecycle.GenerallyAvailable && badgeText == name) { @@ -160,17 +153,18 @@ } @if (applicability.Version is not null and not AllVersions) { - if (name == "Elastic Stack") - { - if (applicability.Version <= currentStackVersion) + @if (name != "Elastic Stack" || applicability.Version <= currentStackVersion) + { + + @applicability.Version + + } + else { - @applicability.Version + + @badgeText + } - } - else - { - @applicability.Version - } } diff --git a/tests/authoring/Inline/AppliesToRole.fs b/tests/authoring/Inline/AppliesToRole.fs index d911e533c..b5fcb830a 100644 --- a/tests/authoring/Inline/AppliesToRole.fs +++ b/tests/authoring/Inline/AppliesToRole.fs @@ -29,15 +29,17 @@ This is an inline {applies_to}`stack: preview 9.1` element. let ``validate HTML: generates link and alt attr`` () = markdown |> convertsToHtml """

This is an inline - - - Planned - - - - - element. -

+ + + Elastic Stack + + + Planned + + + + + element.

"""