We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb8d939 commit bee6285Copy full SHA for bee6285
src/components/ChallengeContributePage/handleImportYaml.tsx
@@ -188,8 +188,16 @@ export function updateChallengeInCollection(
188
currentField = fieldName;
189
} else {
190
// 不是字段开始,可能是复杂字段的一部分
191
- // 我们不处理这些嵌套字段内的注释
192
- commentBuffer = [];
+ // 我们保留这些注释,可能是块级注释或值的一部分
+ if (commentBuffer.length > 0 && currentField) {
193
+ // 如果已经有这个字段的注释,添加到现有注释中
194
+ if (challengeWithComments[currentField]) {
195
+ challengeWithComments[currentField].push(...commentBuffer);
196
+ } else {
197
+ challengeWithComments[currentField] = [...commentBuffer];
198
+ }
199
+ commentBuffer = [];
200
201
}
202
203
0 commit comments