mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: update buildContent
This commit is contained in:
1 parent
7bd7325db6
commit
308605f884
3 files changed
+46
-13
No files matched your search
@@ -17,7 +17,8 @@ export function buildContent(source: ProblemSource | ContentNode[], type: 'markd
|
||||
? source.map((node) => [
|
||||
node.type !== 'Plain' ? `<h2>${node.sectionTitle}</h2>` : '',
|
||||
node.type === 'Sample'
|
||||
? `<h2>${_('Sample Input')}<h2><pre>${node.payload[0]}</pre><h2>${_('Sample Output')}</h2><pre>${node.payload[1]}</pre>`
|
||||
? `<pre><code class="language-input${++cnt}">${node.payload[0]}</code></pre>`
|
||||
+ `<pre><code class="language-output${cnt}">${node.payload[1]}</code></pre>`
|
||||
: '',
|
||||
node.text,
|
||||
].join('\n')).join('\n')
|
||||
|
||||
Reference in new issue
Block a user