mirror of
https://github.com/elkowar/eww.git
synced 2024-08-16 23:30:34 +03:00
Exclude duplicates of widget property in docs (#276)
This commit is contained in:
parent
a07fb35eda
commit
07eeac340f
15
gen-docs.ts
15
gen-docs.ts
@ -108,13 +108,16 @@ function parseDocs(code: string) {
|
||||
if (possibleMatch == -1) {
|
||||
console.log(`Failed to find a match for "${propMatch[1].replace("-", "_")}" ~ ${JSON.stringify(matches, null, 2)} ~ ${lines[no]}`)
|
||||
}
|
||||
const type = replaceTypeNames(matches[possibleMatch + 1])
|
||||
|
||||
widgets[currentWidget].props.push({
|
||||
name: propMatch[1],
|
||||
desc: propMatch[2],
|
||||
type: type ?? "no-type-found"
|
||||
});
|
||||
if (!widgets[currentWidget].props.some(p => p.name == propMatch[1])) {
|
||||
const type = replaceTypeNames(matches[possibleMatch + 1])
|
||||
|
||||
widgets[currentWidget].props.push({
|
||||
name: propMatch[1],
|
||||
desc: propMatch[2],
|
||||
type: type ?? "no-type-found"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return widgets;
|
||||
|
Loading…
Reference in New Issue
Block a user