Skip to content
Snippets Groups Projects
Commit 42636083 authored by James Yu's avatar James Yu
Browse files

Prevent same TeX structure element from being multiple numbered

parent cf2589c2
Branches flicker-free-refresh
No related tags found
No related merge requests found
...@@ -248,7 +248,7 @@ function insertSubFile(structs: FileStructureCache, struct?: TeXElement[], trave ...@@ -248,7 +248,7 @@ function insertSubFile(structs: FileStructureCache, struct?: TeXElement[], trave
if (lw.root.file.path === undefined) { if (lw.root.file.path === undefined) {
return [] return []
} }
struct = struct ?? structs[lw.root.file.path] ?? [] struct = JSON.parse(JSON.stringify(struct ?? structs[lw.root.file.path] ?? [])) as TeXElement[]
traversed = traversed ?? [lw.root.file.path] traversed = traversed ?? [lw.root.file.path]
let elements: TeXElement[] = [] let elements: TeXElement[] = []
for (const element of struct) { for (const element of struct) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment