core: fix buildContent

This commit is contained in:
undefined committed 2021-06-21 17:36:03 +08:00
1 parent 1102496b91
commit 577e100ca6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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'
? [
'',