From 37b6ac10ac26664561a542f5794cbc7bfd949292 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Wed, 25 Oct 2023 22:44:16 -0400 Subject: [PATCH] [fix] CFI from XPath issue --- assets/reader/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/reader/index.js b/assets/reader/index.js index 893e074..8baf329 100644 --- a/assets/reader/index.js +++ b/assets/reader/index.js @@ -943,7 +943,7 @@ class EBookReader { // Replace `.0` Ending Indexes .replace(/\.(\d+)$/, "") // Remove potential trailing `text()` - .replace(/\/text\(\)$/, ""); + .replace(/\/text\(\)(\[\d+\])?$/, ""); // Validate Namespace if (namespaceURI) remainingXPath = remainingXPath.replaceAll("/", "/ns:");