Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,15 +668,20 @@ function generateTaginfo(presets, fields, deprecated, discarded, tstrings, proje
});

if (!discarded) discarded = {};
Object.keys(discarded).forEach(key => {
for (const key in discarded) {
let description = '🄳🄳 (discarded tag)';
/** @type {TaginfoTag} */
let tag = {
key,
description: [description]
};
coalesceTags(taginfo, tag);
});
if (discarded[key] === true) {
// key=*
let tag = { key, description: [description] };
coalesceTags(taginfo, tag);
} else {
// key=value
for (const value in discarded[key]) {
const tag = { key, value, description: [description] };
coalesceTags(taginfo, tag);
}
}
}

taginfo.tags.forEach(elem => {
if (elem.description) {
Expand Down
11 changes: 9 additions & 2 deletions schemas/discarded.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/ideditor/schema-builder/raw/main/schemas/discarded.json",
"title": "Discarded tags",
"description": "Keys of tags to be deleted when editing features.",
"description": "Keys or tags to be deleted when editing features.",
"type": "object",
"additionalProperties": {
"type": "boolean"
"anyOf": [
{ "type": "boolean", "enum": [true] },
{
"type": "object",
"additionalProperties": { "type": "boolean", "enum": [true] },
"minProperties": 1
}
]
}
}