@@ -19,5 +19,10 @@ namespace Larkdown.Parser.Ast
Text += " " + text;
return this;
}
+
+ public bool IsEmpty()
+ {
+ return String.IsNullOrEmpty(Text);
+ }
@@ -32,7 +32,10 @@ namespace Larkdown.Parser
- ast.Add(node);
+ if (!node.IsEmpty())
+ ast.Add(node);
return ast;