mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
15 lines
354 B
JavaScript
15 lines
354 B
JavaScript
const cleanUpPrimaryKeyValue = (value) => {
|
|
// For Bing convoId handling
|
|
return value.replace(/--/g, '-');
|
|
};
|
|
|
|
function replaceSup(text) {
|
|
if (!text.includes('<sup>')) return text;
|
|
const replacedText = text.replace(/<sup>/g, '^').replace(/\s+<\/sup>/g, '^');
|
|
return replacedText;
|
|
}
|
|
|
|
module.exports = {
|
|
cleanUpPrimaryKeyValue,
|
|
replaceSup
|
|
};
|