diff --git a/OSS/MarkdownDeep/TableSpec.cs b/OSS/MarkdownDeep/TableSpec.cs index 0083c90..f550802 100644 --- a/OSS/MarkdownDeep/TableSpec.cs +++ b/OSS/MarkdownDeep/TableSpec.cs @@ -227,15 +227,31 @@ public static TableSpec Parse(StringScanner p) #region RGregg extensions - public string[] ColumnHeaders { get { return Headers.ToArray(); } } + public string[] ColumnHeaders + { + get + { + if (null != Headers) + return Headers.ToArray(); + else + return new string[0]; + } + } public string[][] RowValues { get - { - var rowArrays = from row in Rows - select row.ToArray(); - return rowArrays.ToArray(); + { + if (null != Rows) + { + var rowArrays = from row in Rows + select row.ToArray(); + return rowArrays.ToArray(); + } + else + { + return new string[][] { new string[] { } }; + } } }