Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '#%E5%89%8D%E8%A8%80' is not a valid selector.
at Object.findOne (https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:9928)
at bn._initializeTargetsAndObservables (https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:73144)
at bn.refresh (https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:71396)
at new bn (https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:71269)
at bn.getOrCreateInstance (https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:8197)
at https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:74198
at i (https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js:6:4253)
#%E5%89%8D%E8%A8%80 is just my first heading of the nav. It's #前言
And when I rollback the setting and source to bootstrap4, all is ok.
Sorry to hear about the trouble; sounds like this is a Bootstrap issue rather than a bootstrap-toc one. https://github.com/twbs/bootstrap/issues/36939 looks like it may be the issue to follow. Good luck!
When I switch to bootstrap5 (using https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.bundle.min.js) according to the manual found:
#%E5%89%8D%E8%A8%80
is just my first heading of the nav. It's#前言
And when I rollback the setting and source to bootstrap4, all is ok.