Мобильная адаптация, дока

This commit is contained in:
2026-08-01 02:59:25 -07:00
parent 4bc65f71cf
commit 354c8e5489
4 changed files with 76 additions and 39 deletions

View File

@@ -18,14 +18,20 @@ async function exists(path) {
}
}
function capitalizeFirstLetter(value) {
return value.trim().replace(/\p{L}/u, (letter) => letter.toLocaleUpperCase());
}
function cleanComment(...comments) {
return comments
const description = comments
.filter(Boolean)
.join('\n')
.split('\n')
.map((line) => line.replace(/^\s*#?\s?/, '').trim())
.filter(Boolean)
.join(' ');
return capitalizeFirstLetter(description);
}
function mapFields(node) {
@@ -128,7 +134,7 @@ async function readLayer(path) {
return {
version: Number(document.get('version')),
description: String(document.get('description') || ''),
description: capitalizeFirstLetter(String(document.get('description') || '')),
source: basename(path),
enums: mapNamedCollection(document.get('enums', true), 'enum'),
types: mapNamedCollection(document.get('types', true), 'type'),