Skip to content

Commit

Permalink
fix: encode markdown record ids (#2165)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeisJayaswal authored Feb 14, 2025
1 parent 6a1445d commit c3a66d0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export async function createMarkdownRecords({
const rootRecords = chunked_code_snippets.map((chunk, i) => {
return {
...base_root_markdown_record,
id: `${base_root_markdown_record.id}-chunk:${i}`,
id: createHash("sha256")
.update(`${base_root_markdown_record.id}-chunk:${i}`)
.digest("hex"),
attributes: {
...base_root_markdown_record.attributes,
chunk,
Expand Down

0 comments on commit c3a66d0

Please sign in to comment.