core: fix buildContent

pull/162/head
undefined 3 years ago
parent 1102496b91
commit 577e100ca6

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.28.46",
"version": "2.28.47",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",

@ -23,7 +23,7 @@ export function buildContent(source: ProblemSource | ContentNode[], type: 'markd
node.text,
].join('\n')).join('\n')
: source.map((node) => [
node.type !== 'Plain' ? `## ${node.sectionTitle}` : '',
node.type !== 'Plain' && (node.type !== 'Sample' || !cnt) ? `## ${node.sectionTitle}` : '',
...node.type === 'Sample'
? [
'',

Loading…
Cancel
Save