From 5fe16ada3d3cbf16431056c9f750180de007e496 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Fri, 3 Jul 2020 23:13:18 +0200 Subject: [PATCH] fix: parse certificates separately (#39182) --- tools/challenge-md-parser/tests-to-data.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/challenge-md-parser/tests-to-data.js b/tools/challenge-md-parser/tests-to-data.js index 06c8388efc..bd957a4bcd 100644 --- a/tools/challenge-md-parser/tests-to-data.js +++ b/tools/challenge-md-parser/tests-to-data.js @@ -34,7 +34,9 @@ function plugin() { ); tests.question.text = mdToHTML(tests.question.text); } - if (tests.tests) { + // since tests are overloaded (they're both a list of projects and + // actual tests), it's necessary to check which they are: + if (tests.tests && tests.tests[0] && tests.tests[0].text) { tests.tests = tests.tests.map(({ text, testString }) => ({ text: mdToHTML(text), testString