From c2c4edfd9a0c432acd0b1677dc9b2cfee00bbb27 Mon Sep 17 00:00:00 2001 From: Jerome Simeon Date: Fri, 21 Aug 2020 20:29:04 -0400 Subject: [PATCH] fix(pdf) Fixes pdf generation for optionals/conditionals Signed-off-by: Jerome Simeon --- packages/markdown-pdf/src/ToPdfMakeVisitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/markdown-pdf/src/ToPdfMakeVisitor.js b/packages/markdown-pdf/src/ToPdfMakeVisitor.js index f9f87c54..b501c662 100644 --- a/packages/markdown-pdf/src/ToPdfMakeVisitor.js +++ b/packages/markdown-pdf/src/ToPdfMakeVisitor.js @@ -205,8 +205,10 @@ class ToPdfMakeVisitor { result.text = fixedText; } break; + case 'Optional': case 'Conditional': { - result.text = thing.nodes[0].text; + const child = this.processChildNodes(thing,parameters); + result.text = child; } break; case 'HtmlInline':