mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-25 07:25:13 +00:00
removes createNode utility
This commit is contained in:
parent
150cbd26d5
commit
2d2bea6d3a
1 changed files with 0 additions and 11 deletions
11
src/util.ts
11
src/util.ts
|
@ -1,16 +1,5 @@
|
|||
import { isMfmBlock, MfmNode, TEXT } from './node';
|
||||
|
||||
export function createNode(type: string, props?: Record<string, any>, children?: MfmNode[]): MfmNode {
|
||||
const node: any = { type };
|
||||
if (props != null) {
|
||||
node.props = props;
|
||||
}
|
||||
if (children != null) {
|
||||
node.children = children;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
export function mergeText(nodes: (MfmNode | string)[]): MfmNode[] {
|
||||
const dest: MfmNode[] = [];
|
||||
const storedChars: string[] = [];
|
||||
|
|
Loading…
Reference in a new issue