mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 12:38:06 +00:00
fix: use matched[1] for route capture group to prevent duplicated path in .pine fetch
This commit is contained in:
+1
-1
@@ -223,7 +223,7 @@
|
|||||||
// Route handler for .pine files — fetch and wrap in markdown code fence
|
// Route handler for .pine files — fetch and wrap in markdown code fence
|
||||||
routes: {
|
routes: {
|
||||||
'/(.+\\.pine)': function(route, matched, next) {
|
'/(.+\\.pine)': function(route, matched, next) {
|
||||||
var pinePath = matched;
|
var pinePath = matched[1];
|
||||||
var absUrl = new URL(pinePath, document.baseURI).href;
|
var absUrl = new URL(pinePath, document.baseURI).href;
|
||||||
fetch(absUrl).then(function(r) {
|
fetch(absUrl).then(function(r) {
|
||||||
if (!r.ok) throw new Error(r.status);
|
if (!r.ok) throw new Error(r.status);
|
||||||
|
|||||||
Reference in New Issue
Block a user