mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
🛠️ Improve logging format for parseSvgFilename utility
This commit is contained in:
@@ -13,7 +13,9 @@ export const parseSvgFilename = (params: ParseSvgFilename): string => {
|
||||
|
||||
if (/^\d/.test(component)) {
|
||||
if (log) {
|
||||
console.log(`[⚠️] Component name starts with a number: ${component}`);
|
||||
console.log(
|
||||
`\n - [⚠️] Component name starts with a number: ${component}`,
|
||||
);
|
||||
}
|
||||
component = "Icon" + component;
|
||||
}
|
||||
@@ -33,7 +35,9 @@ export const parseSvgFilename = (params: ParseSvgFilename): string => {
|
||||
]);
|
||||
if (reserved.has(component)) {
|
||||
if (log) {
|
||||
console.log(`[⚠️] Component name is a reserved keyword: ${component}`);
|
||||
console.log(
|
||||
`\n - [⚠️] Component name is a reserved keyword: ${component}`,
|
||||
);
|
||||
}
|
||||
component = "Icon" + component[0].toUpperCase() + component.slice(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user