Skip to content

Commit

Permalink
Fix for PowerDocu issue 93 for Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
modery committed Mar 3, 2023
1 parent 74e2629 commit 67b3ef0
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion PowerDocu.Common/MarkdownBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,33 @@ protected string AddExpressionDetails(List<Expression> inputs)
{
operandsCellSB.Append(AddExpressionTable((Expression)input.expressionOperands[0]).Append("</table>"));
}
else
else if (input.expressionOperands[0]?.GetType() == typeof(string))
{
operandsCellSB.Append(input.expressionOperands[0]?.ToString());
}
else if (input.expressionOperands[0]?.GetType() == typeof(List<object>))
{
operandsCellSB.Append("<table>");
foreach (object obj in (List<object>)input.expressionOperands[0])
{
if (obj.GetType().Equals(typeof(Expression)))
{
operandsCellSB.Append(AddExpressionTable((Expression)obj, false));
}
else if (obj.GetType().Equals(typeof(List<object>)))
{
foreach (object o in (List<object>)obj)
{
operandsCellSB.Append(AddExpressionTable((Expression)o, false));
}
}
else
{
string s = "";
}
}
operandsCellSB.Append("</table>");
}
}
else
{
Expand Down

0 comments on commit 67b3ef0

Please sign in to comment.