fix: include [0] byte when encoding on MD

This commit is contained in:
Adhiraj Singh
2022-04-24 16:51:05 +05:30
parent 3c278b35f0
commit 43df500899

View File

@@ -6,7 +6,7 @@ import type { BinaryNode, BinaryNodeCodingOptions } from './types'
export const encodeBinaryNode = (
{ tag, attrs, content }: BinaryNode,
opts: Pick<BinaryNodeCodingOptions, 'TAGS' | 'TOKEN_MAP'> = constants,
buffer: number[] = []
buffer: number[] = [0]
) => {
const { TAGS, TOKEN_MAP } = opts