From 1a32d9a9b2838c193f2d0e5ebad68f506b38c3c3 Mon Sep 17 00:00:00 2001 From: MartinLBeacham Date: Sat, 6 Apr 2024 16:31:39 -0400 Subject: [PATCH] =?UTF-8?q?fix=20conversion=20of=20=E3=85=8A=20to=20ch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/string/lib/slugify.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/string/lib/slugify.js b/packages/string/lib/slugify.js index 1f5563439..f31d1786b 100644 --- a/packages/string/lib/slugify.js +++ b/packages/string/lib/slugify.js @@ -1,6 +1,5 @@ const unidecode = require('unidecode'); const stripInvisibleChars = require('./strip-invisible-chars'); - /** * Slugify * @@ -15,6 +14,10 @@ module.exports = function (string, options = {}) { // Ensure we have a string string = string || ''; + //fix for ㅊ + // this was unidecode's recommended change. It did not work: + // unidecode("ㅊ", "ch"); + string = string.replaceAll(/\u314A/g,'ch'); // Strip all characters that cannot be printed string = stripInvisibleChars(string);