Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import smartypants from './smartypants.js';
|
||||
|
||||
// attr: 1 = do everything (quotes, em-dashes, ellipses)
|
||||
const SMARTY_ATTR = '1';
|
||||
|
||||
const { messageFormatter } = SillyTavern.getContext();
|
||||
|
||||
messageFormatter.addHook((mes, ctx) => {
|
||||
if (ctx.isUser) return mes;
|
||||
return smartypants(mes, SMARTY_ATTR);
|
||||
}, {
|
||||
stage: messageFormatter.stage.AFTER_MARKDOWN,
|
||||
order: messageFormatter.order.NORMAL,
|
||||
});
|
||||
Reference in New Issue
Block a user