The auto-generated ID of #1-section-1 is not a valid querySelector and throws an error when selected in the sidebar (in src/Home.vue#jumpToHash). So it needs to be quoted, e.g.
const el = document.querySelector(hash.replace(/^#\d/, m => '#\\' + m.charCodeAt(1).toString(16) + ' '))
(NOTE: CSS.escape will cover more cases, but the MDN compatibility matrix shows some notable holes, e.g. Safari on IOS, and the generated hash avoid most other issues anyway as far as I can tell)
Alternatively, a more robust hash could be generated in this situation. Or as a workaround, just never start a section heading with a number :-)
If a section heading starts with a number, e.g.
The auto-generated ID of
#1-section-1
is not a valid querySelector and throws an error when selected in the sidebar (in src/Home.vue#jumpToHash). So it needs to be quoted, e.g.(NOTE: CSS.escape will cover more cases, but the MDN compatibility matrix shows some notable holes, e.g. Safari on IOS, and the generated hash avoid most other issues anyway as far as I can tell)
Alternatively, a more robust hash could be generated in this situation. Or as a workaround, just never start a section heading with a number :-)