We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b7eec4 commit 4a915ccCopy full SHA for 4a915cc
src/lib/serializers/Html.ts
@@ -81,12 +81,13 @@ export const parseByString = (content: string) => {
81
const body = $('body')
82
const root: TItem<typeof ItemLocation.SERVER>[] = []
83
const rdt = getRootFolder(body).children('dt')
84
+ let idCounter = 1
85
86
const parseNode = (node: cheerio.Cheerio<any>, parentId?: string|number) => {
87
const eq0 = node.children().eq(0)
88
const title = typeof eq0.text() !== 'undefined' ? eq0.text() : ''
89
let url = ''
- const id = typeof eq0.attr('id') !== 'undefined' ? eq0.attr('id') : ''
90
+ const id = typeof eq0.attr('id') !== 'undefined' ? eq0.attr('id') : idCounter++
91
let children: TItem<typeof ItemLocation.SERVER>[] = []
92
93
switch (eq0[0].name) {
0 commit comments