Polish home page: clamp tile teasers, balance hero heading, fix embed gap

This commit is contained in:
tleininger committed 2026-10-01 14:44:55 +02:00
1 parent c24ca16a41
commit 6e5a30607e
4 files changed
+44 -47

No files matched your search

+10 -8
View File
@@ -104,11 +104,17 @@ public class MarkdownTests
}
[Fact]
public void First_sentence_longer_than_the_limit_is_cut_between_words()
{
var sentence = Markdown.FirstSentence("Eins zwei drei vier fünf.", maxLength: 12);
public void First_sentence_drops_a_colon_that_leads_into_a_list() =>
Markdown.FirstSentence("Formulare zum Herunterladen:\n\n- Antrag")
.ShouldBe("Formulare zum Herunterladen");
sentence.ShouldBe("Eins zwei…");
[Fact]
public void First_sentence_is_never_cut_short()
{
// Long teasers are clamped by the tile's CSS, not by a character count.
var sentence = string.Join(' ', Enumerable.Repeat("Wort", 60)) + ".";
Markdown.FirstSentence(sentence).ShouldBe(sentence);
}
[Theory]
@@ -119,8 +125,4 @@ public class MarkdownTests
[InlineData("::: hinweis\nText im Baustein.\n:::")]
public void First_sentence_is_empty_without_a_top_level_paragraph(string? markdown) =>
Markdown.FirstSentence(markdown).ShouldBe("");
[Fact]
public void First_sentence_rejects_a_limit_below_one() =>
Should.Throw<ArgumentOutOfRangeException>(() => Markdown.FirstSentence("Text.", maxLength: 0));
}