From a8fe5d665025eaf416922e7fd5478a84b9082599 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 26 Apr 2016 22:09:16 +0100 Subject: Add test for empty paragraph --- .../mammoth/internal/styles/parsing/StyleMapParser.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'dotnet/Mammoth') diff --git a/dotnet/Mammoth/Couscous/mammoth/internal/styles/parsing/StyleMapParser.cs b/dotnet/Mammoth/Couscous/mammoth/internal/styles/parsing/StyleMapParser.cs index 44d1ddd..53315f3 100644 --- a/dotnet/Mammoth/Couscous/mammoth/internal/styles/parsing/StyleMapParser.cs +++ b/dotnet/Mammoth/Couscous/mammoth/internal/styles/parsing/StyleMapParser.cs @@ -4,11 +4,19 @@ using Mammoth.Couscous.org.zwobble.mammoth.@internal.styles; namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.styles.parsing { internal static class StyleMapParser { internal static StyleMap parseStyleMappings(List mappings) { - return StyleMap.builder().build(); + return DefaultStyleMap(); } internal static StyleMap parse(string styleMap) { - return StyleMap.builder().build(); + return DefaultStyleMap(); + } + + private static StyleMap DefaultStyleMap() { + return StyleMap.builder() + + .mapParagraph(ParagraphMatcher.styleName("Normal"), HtmlPath.element("p")) + + .build(); } } } -- cgit v1.2.3