From 7ff03ae9f7c7025576486e80bdd11c8deafa7ed2 Mon Sep 17 00:00:00 2001 From: Enzo Notario Date: Tue, 5 Nov 2024 21:15:30 -0300 Subject: [PATCH] fix(PathsSummary): allows to navigate to Operations with {} chars (#117) --- src/components/Path/OAPathsByTags.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Path/OAPathsByTags.vue b/src/components/Path/OAPathsByTags.vue index c8d25dff..2307f8a8 100644 --- a/src/components/Path/OAPathsByTags.vue +++ b/src/components/Path/OAPathsByTags.vue @@ -74,7 +74,11 @@ const internalTags = ref([ function scrollIntoViewWithOffset(hash, offset) { if (!import.meta.env.SSR) { - const element = document.querySelector(hash) + const element = document.querySelector( + hash + // . escape { and } characters + .replace(/([{}])/g, '\\$1'), + ) if (!element) { return