mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-05 16:24:41 +09:00
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
@ -329,12 +329,20 @@ export class NoteEntityService implements OnModuleInit {
|
||||
|
||||
if (packed.user.isCat && packed.text) {
|
||||
const tokens = packed.text ? mfm.parse(packed.text) : [];
|
||||
mfm.inspect(tokens, node => {
|
||||
function nyaizeNode(node: mfm.MfmNode) {
|
||||
if (node.type === 'quote') return;
|
||||
if (node.type === 'text') {
|
||||
// TODO: quoteなtextはskip
|
||||
node.props.text = nyaize(node.props.text);
|
||||
}
|
||||
});
|
||||
if (node.children) {
|
||||
for (const child of node.children) {
|
||||
nyaizeNode(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const node of tokens) {
|
||||
nyaizeNode(node);
|
||||
}
|
||||
packed.text = mfm.toString(tokens);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user