Merge pull request #8 from afairclo/patch-1

Fix for off-by-one precision radius
This commit is contained in:
Brian Shea 2024-06-03 10:17:53 -04:00 committed by GitHub
commit 236fc5c67a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,10 +105,10 @@
const neighborsByNode = {}
const nodesBySearchTitle = {}
const precisionMargins = [
16151245, 11939464, 5969732, 2984866, 1492433, 746217, 373108, 186554,
93277, 46639, 23319, 11660, 5830, 2915, 1457, 729,
364, 182, 91, 46, 23, 11, 6, 3,
1, 1, 0, 0, 0, 0, 0, 0
11939464, 5969732, 2984866, 1492433, 746217, 373108, 186554, 93277,
46639, 23319, 11660, 5830, 2915, 1457, 729, 364,
182, 91, 46, 23, 11, 6, 3, 1,
1, 0, 0, 0, 0, 0, 0, 0
]
// encodes html reserved characters
const html = str => str?.replace(/["&<>]/g, match => `&#${match.charCodeAt(0)};`)