forked from Rosetta/landing
Мобильная адаптация, дока
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user