Skip to content

Commit

Permalink
provide query selector for spx-fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
panoply committed Apr 25, 2024
1 parent b333ead commit 99efe39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ function fragments (options: Options) {
continue;

} else if (charCode === CharCode.HSH) { // hash selectors will augment, eg: #foo > foo
elements.push(fragment.slice(1).trim());
} else {
elements.push(fragment.trim());
} else {
elements.push(`#${fragment.trim()}`);
}
}
} else {
Expand Down Expand Up @@ -217,6 +217,8 @@ export function configure (options: Options = o()) {
$find: new RegExp(`${attr}(?:node|bind|component)|@[a-z]|[a-z]:[a-z]`, 'i'),
$param: new RegExp(`^${attr}[a-zA-Z0-9-]+:`, 'i'),
$target: `${attr}target`,
$fragment: `${attr}fragment`,
$fragments: `[${attr}fragment]`,
$targets: `[${attr}target]:not([${attr}target=false])`,
$morph: `${attr}morph`,
$eval: `${attr}eval`,
Expand Down

0 comments on commit 99efe39

Please sign in to comment.