# -*- coding: utf-8 -*-
import io, sys, os, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
p="index_main.html"
idx=open(p,encoding="utf-8").read()
# VD 末尾多了一个 ]：原来是 ]]);，应该是 ]);
old='"details/ut-c3a91ad.html"]]);'
new='"details/ut-c3a91ad.html"]);'
assert old in idx, "pattern not found"
idx=idx.replace(old,new,1)
open(p,"w",encoding="utf-8").write(idx)
print("FIXED: removed extra ] in VD tail")
