deepdata: core product code (backend, frontend, runtime, deepflow module)

This commit is contained in:
figmar
2026-08-30 19:23:38 +08:00
commit bd3db30be9
1405 changed files with 271727 additions and 0 deletions
@@ -0,0 +1,34 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT
import { Mathematics } from "novel";
/**
* Extended Mathematics extension with markdown serialization support
* Handles both inline math ($...$) and block/display math ($$...$$)
*/
export const MathematicsWithMarkdown = Mathematics.extend({
addStorage() {
return {
markdown: {
serialize(state: any, node: any) {
const latex = node.attrs?.latex || "";
const isBlock = node.attrs?.display === true;
if (isBlock) {
// Block/display math: $$...$$
state.write("$$");
state.write(latex);
state.write("$$");
state.closeBlock(node);
} else {
// Inline math: $...$
state.write("$");
state.write(latex);
state.write("$");
}
},
},
};
},
});