@@ -34366,6 +34366,29 @@ const main_1 = __importDefault(__nccwpck_require__(1730));
3436634366});
3436734367
3436834368
34369+ /***/ }),
34370+
34371+ /***/ 1053:
34372+ /***/ ((__unused_webpack_module, exports) => {
34373+
34374+ "use strict";
34375+
34376+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34377+ exports.reservedWords = void 0;
34378+ exports.reservedWords = [
34379+ "GitHub",
34380+ "BitBucket",
34381+ "GitLab",
34382+ "JSON",
34383+ "via",
34384+ "by",
34385+ "with",
34386+ "for",
34387+ "a",
34388+ "at",
34389+ ];
34390+
34391+
3436934392/***/ }),
3437034393
3437134394/***/ 1730:
@@ -35088,21 +35111,31 @@ exports.Repository = Repository;
3508835111/***/ }),
3508935112
3509035113/***/ 3063:
35091- /***/ ((__unused_webpack_module, exports) => {
35114+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__ ) => {
3509235115
3509335116"use strict";
3509435117
3509535118Object.defineProperty(exports, "__esModule", ({ value: true }));
3509635119exports.randomString = exports.encodeUri = exports.removeImages = exports.titleCase = void 0;
35120+ const words_1 = __nccwpck_require__(1053);
35121+ const normalizeWords = (value) => {
35122+ for (const word of words_1.reservedWords) {
35123+ value = value.replace(new RegExp(`\\b${word}\\b`, "i"), word);
35124+ }
35125+ return value;
35126+ };
3509735127const titleCase = (title) => {
3509835128 if (title === "" || title === undefined) {
3509935129 return "";
3510035130 }
35101- return title
35131+ title = title
3510235132 .replace(/([A-Z])/g, "$1")
3510335133 .toLowerCase()
3510435134 .replace(/(^|\s|-|_)\S/g, (match) => match.toUpperCase())
35105- .replace(/[-_]/g, " ");
35135+ .replace(/[-_]/g, " ")
35136+ .trim();
35137+ const normalized = normalizeWords(title);
35138+ return normalized.charAt(0).toUpperCase() + normalized.slice(1);
3510635139};
3510735140exports.titleCase = titleCase;
3510835141const removeImages = (content) => content
0 commit comments