We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49b92b5 commit 12ded73Copy full SHA for 12ded73
src/model/snippet.fn.ts
@@ -33,8 +33,12 @@ export const createXSnippets = <T extends XSnippetDict>(input: T): T => input;
33
export const mapToVscSnippetDicMeta = (metas: XSnippetDictMeta[], label: string): VscSnippetDictMeta[] =>
34
metas.map(meta => {
35
const entries = Object.entries(meta.dict);
36
- if (entries.length !== new Set(entries.map(([, { name }]) => name)).size)
+ const names = new Set<string>();
37
+ const dup = entries.filter(([, { name }]) => names.has(name) || !names.add(name));
38
+ if (dup.length) {
39
+ console.log(`Found duplicated name in ${meta.filename}: `, dup);
40
throw Error(`Found duplicated name in ${meta.filename}`);
41
+ }
42
43
return {
44
...meta,
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments