Skip to content

Commit

Permalink
No issue: Minor cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
reckart committed Jul 10, 2024
1 parent 44043c2 commit 94973ff
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ export class Visualizer {
let firstFrom: number | null = null
let chunkNo = 0
let space: string
let chunk: Chunk
let chunk: Chunk | null = null
const chunks : Chunk[] = []

for (const fragment of sortedFragments) {
Expand All @@ -831,9 +831,7 @@ export class Visualizer {
}
}

tokenOffsets.forEach(offset => {
const from = offset[0]
const to = offset[1]
for (const [from, to] of tokenOffsets) {
if (firstFrom === null) {
firstFrom = from
}
Expand All @@ -850,7 +848,7 @@ export class Visualizer {
}
// if yes, the next token is in the same chunk
if (currentFragmentId < numFragments && to > sortedFragments[currentFragmentId].from) {
return
continue
}

// otherwise, create the chunk found so far
Expand All @@ -866,7 +864,7 @@ export class Visualizer {
chunks.push(chunk)
lastTo = to
firstFrom = null
})
}

for (const fragment of sortedFragments) {
if (fragment.span.id === 'rel:1-after') {
Expand Down

0 comments on commit 94973ff

Please sign in to comment.