Skip to content

Commit 6cafb1b

Browse files
committed
Fix tests
1 parent 162ccb0 commit 6cafb1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Elastic.Markdown/Myst/Directives/AdmonitionBlock.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ public AdmonitionBlock(DirectiveBlockParser parser, string admonition, ParserCon
2020

2121
var t = Admonition;
2222
var title = Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(t);
23-
if (_admonition is "admonition" or "dropdown" && !string.IsNullOrEmpty(Arguments))
24-
title = Arguments;
25-
else if (!string.IsNullOrEmpty(Arguments))
26-
title += $" {Arguments}";
2723
Title = title;
2824

2925
}
@@ -44,6 +40,10 @@ public override void FinalizeAndValidate(ParserContext context)
4440
if (DropdownOpen.HasValue)
4541
Classes = "dropdown";
4642

43+
if (_admonition is "admonition" or "dropdown" && !string.IsNullOrEmpty(Arguments))
44+
Title = Arguments;
45+
else if (!string.IsNullOrEmpty(Arguments))
46+
Title += $" {Arguments}";
4747
Title = Title.ReplaceSubstitutions(context);
4848
}
4949
}

0 commit comments

Comments
 (0)