Skip to content

Commit

Permalink
fix assign to ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-pol committed Jan 3, 2025
1 parent 05b9b2c commit 4a1f180
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/js/stitches.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ function setAllStitches() {
}
function setIgnoredStitches() {
var replacement = `=${paintStitchValue()}`
var search = new RegExp(`=-&`,'g')
var searchLast = new RegExp(`=-^`,'g')
let q = getQ()
.replace(search, replacement)
.replace(searchLast, replacement)
let q = getQ().split('&').map((kv => replaceIgnored(kv, replacement))).join('&')
show(q)
}
function replaceIgnored(kv, replacement) {
if (/[a-z][0-9]+=-/.test(kv)) {
return kv.replace(/=-/, replacement);
}
return kv;
}
function whiting (kv) {
var k = kv.trim().replace(/[^a-zA-Z0-9]/g,"")
if (!kv.trim().startsWith("whiting")) return false
Expand Down

0 comments on commit 4a1f180

Please sign in to comment.