Skip to content

Commit

Permalink
fix: fixing attribute's subpath starting with colon (#2486)
Browse files Browse the repository at this point in the history
* fix: fixing attribute's subpath starting with colon

* fix: adding _ and comment

---------

Co-authored-by: Patricio Albizu <[email protected]>
  • Loading branch information
palbizu and Patricio Albizu authored Oct 24, 2023
1 parent 3170394 commit 92ce31a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export const tryParseStringForAttribute = (
return undefined;
}
const potentialSubpath = stringAfterAttributeName.slice(MAP_LHS_DELIMITER.length);
// Subpaths support alphanumeric, -, - and . characters
const firstNonSubpathCharacterIndex = potentialSubpath.search(/[^\w\-\.]/);
// Subpaths support alphanumeric, -, _ , . and : characters
const firstNonSubpathCharacterIndex = potentialSubpath.search(/[^\w\-\_\.\:]/);
const subpath =
firstNonSubpathCharacterIndex === -1
? potentialSubpath
Expand Down

0 comments on commit 92ce31a

Please sign in to comment.