mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
core: fix buildContent display
This commit is contained in:
1 parent
df66659c5f
commit
5b0478fb3f
2 files changed
+3
-7
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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')),
|
||||
|
||||
Reference in new issue
Block a user