diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 7be8f4cf9..eca335524 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "2.25.4", + "version": "2.25.5", "bin": "bin/hydrooj.js", "main": "dist/loader.js", "typings": "dist/loader.d.ts", diff --git a/packages/hydrooj/src/lib/content.ts b/packages/hydrooj/src/lib/content.ts index 6d0e9478d..1789d0632 100644 --- a/packages/hydrooj/src/lib/content.ts +++ b/packages/hydrooj/src/lib/content.ts @@ -25,11 +25,9 @@ export function buildContent(source: ProblemSource | ContentNode[], type: 'markd node.type !== 'Plain' ? `## ${node.sectionTitle}` : '', ...node.type === 'Sample' ? [ - `## ${_('Sample Input')}`, `\`\`\`input${++cnt}`, node.payload[0], '```', - `## ${_('Sample Output')}`, `\`\`\`output${cnt}`, node.payload[1], '```', @@ -58,12 +56,10 @@ export function buildContent(source: ProblemSource | ContentNode[], type: 'markd ...source.input ? [`## ${_('Input Format')}`, source.input] : [], ...source.output ? [`## '${_('Output Format')}`, source.output] : [], ...(source.samples).map((sample, i) => [ - `## ${_('Sample Input')} ${i + 1}`, - '```', + `\`\`\`input${i + 1}`, sample[0], '```', - `## ${_('Sample Output')} ${i + 1}`, - '```', + `\`\`\`output${i + 1}`, sample[1], '```', ].join('\n')),