@@ -34382,6 +34382,7 @@ const repository_1 = __nccwpck_require__(6629);
3438234382const preview_1 = __nccwpck_require__(1365);
3438334383const outputs_1 = __nccwpck_require__(8595);
3438434384const packageManagers_1 = __nccwpck_require__(2453);
34385+ const strings_1 = __nccwpck_require__(3063);
3438534386const previewUpdater = async () => {
3438634387 // Inputs
3438734388 const { token, configPath } = (0, inputs_1.parse)();
@@ -34397,7 +34398,7 @@ const previewUpdater = async () => {
3439734398 // Read names
3439834399 const packageManager = (0, packageManagers_1.getPackageManager)(config);
3439934400 config.image.parameters.packageName = packageManager.name;
34400- config.image.parameters.title = config.repository.repo;
34401+ config.image.parameters.title = (0, strings_1.titleCase)( config.repository.repo) ;
3440134402 config.image.parameters.description = packageManager.description || config.repository.owner;
3440234403 // Show working directory
3440334404 (0, core_1.info)(`Working directory: ${config.directory}`);
@@ -34730,18 +34731,14 @@ exports.getPackageManager = getPackageManager;
3473034731Object.defineProperty(exports, "__esModule", ({ value: true }));
3473134732exports.setPreview = void 0;
3473234733const image_1 = __nccwpck_require__(7828);
34734+ const strings_1 = __nccwpck_require__(3063);
3473334735const hasHeader = (content) => content.match(/^#\s+/);
3473434736const cleanUp = (content) => content
3473534737 .replace(/^(#\s+.+\n+)(!\[.+]\(.*\)\n?){1,2}\n?/, '$1\n')
3473634738 .replace(/^(#\s+.+\n+)(<img\s.*\/>\n?){1,2}\n?/, '$1\n');
34737- const titleCase = (title) => title
34738- .replace(/([A-Z])/g, '$1')
34739- .toLowerCase()
34740- .replace(/(^|\s|-|_)\S/g, (match) => match.toUpperCase())
34741- .replace(/[-_]/g, ' ');
3474234739const setPreview = (content, config) => {
3474334740 if (!hasHeader(content)) {
34744- const title = titleCase(config.image.parameters.title);
34741+ const title = (0, strings_1. titleCase) (config.image.parameters.title);
3474534742 content = `# ${title}\n\n${content}`;
3474634743 }
3474734744 const images = (0, image_1.getImages)(config).join('\n');
@@ -34923,6 +34920,23 @@ class Repository {
3492334920exports.Repository = Repository;
3492434921
3492534922
34923+ /***/ }),
34924+
34925+ /***/ 3063:
34926+ /***/ ((__unused_webpack_module, exports) => {
34927+
34928+ "use strict";
34929+
34930+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34931+ exports.titleCase = void 0;
34932+ const titleCase = (title) => title
34933+ .replace(/([A-Z])/g, '$1')
34934+ .toLowerCase()
34935+ .replace(/(^|\s|-|_)\S/g, (match) => match.toUpperCase())
34936+ .replace(/[-_]/g, ' ');
34937+ exports.titleCase = titleCase;
34938+
34939+
3492634940/***/ }),
3492734941
3492834942/***/ 2613:
0 commit comments