From ea9b996aae28e61006743f25b346139186e0029b Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Mon, 6 Nov 2023 19:41:35 -0500 Subject: [PATCH] [fix] regression --- assets/reader/index.js | 3 ++- graph/graph.go | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/reader/index.js b/assets/reader/index.js index 938daef..dae4f65 100644 --- a/assets/reader/index.js +++ b/assets/reader/index.js @@ -1034,7 +1034,8 @@ class EBookReader { // XPath to CSS Selector let derivedSelector = remainingXPath .replace(/^\/html\/body/, "body") - .replace(/\/(\w+)\[(\d+)\]/g, " $1:nth-of-type($2)"); + .replace(/\/(\w+)\[(\d+)\]/g, " $1:nth-of-type($2)") + .replace(/\//g, " "); // Validate Namespace if (namespaceURI) remainingXPath = remainingXPath.replaceAll("/", "/ns:"); diff --git a/graph/graph.go b/graph/graph.go index a373e45..c52aabd 100644 --- a/graph/graph.go +++ b/graph/graph.go @@ -101,9 +101,6 @@ func getSVGBezierOpposedLine(pointA SVGGraphPoint, pointB SVGGraphPoint) SVGBezi Length: int(math.Sqrt(math.Pow(lengthX, 2) + math.Pow(lengthY, 2))), Angle: int(math.Atan2(lengthY, lengthX)), } - - // length = Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)), - // angle = Math.atan2(lengthY, lengthX) } func getSVGBezierControlPoint(currentPoint *SVGGraphPoint, prevPoint *SVGGraphPoint, nextPoint *SVGGraphPoint, isReverse bool) SVGGraphPoint {