(items)
| 130 | } |
| 131 | |
| 132 | function renderProblemIndex(items) { |
| 133 | const rows = items.map((item) => { |
| 134 | const repoCell = item.repoPath ? `[\`${item.repoPath}\`](${encodeURI(`../${item.repoPath}`)})` : ""; |
| 135 | return `| ${item.leetcodeId} | ${item.titleZh} | ${difficultyZh(item.difficulty)} | ${item.categoryZh} | [${item.slug}](${item.siteUrl}) | ${repoCell} |`; |
| 136 | }); |
| 137 | |
| 138 | return `# LeetCode 动画索引 |
| 139 | |
| 140 | 本文件由 \`tools/scripts/sync-algomooc-index.js\` 生成,数据来源为网站侧 \`study_index.js\`。 |
| 141 | |
| 142 | - LeetCode 题数:${items.length} |
| 143 | - 数据文件:[\`docs/data/manifest.json\`](data/manifest.json) |
| 144 | - 按专题查看:[\`docs/index-by-topic.md\`](index-by-topic.md) |
| 145 | |
| 146 | | # | 题目 | 难度 | 分类 | 网站路径 | 仓库目录 | |
| 147 | | :-- | :-- | :-- | :-- | :-- | :-- | |
| 148 | ${rows.join("\n")} |
| 149 | `; |
| 150 | } |
| 151 | |
| 152 | function renderTopicIndex(items) { |
| 153 | const groups = new Map(); |
no test coverage detected