Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Jul 4, 2024
1 parent a24088a commit b5afd11
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function transformAlias(
if (typeof keep === 'string')
keep = { prefix: keep, block: true }

const extraRE = new RegExp(`(${escapeRegExp(prefix)}|${escapeRegExp(keep.prefix)})([\:\\w-]+)`, 'g')
const extraRE = new RegExp(`(${escapeRegExp(prefix)}|${escapeRegExp(keep.prefix)})([\\w-:]+)`, 'g')
const map = new Map<string, ShortcutValue | false>()

for (const item of Array.from(code.original.matchAll(extraRE))) {
Expand Down
10 changes: 0 additions & 10 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ describe('transformer alias', () => {
],
]
`)

expect(await expandShortcut('tapped:text-blue', uno))
.toMatchInlineSnapshot(`
[
[
"hover:text-blue",
"active:text-blue",
],
]
`)
})

it('keep shortcut with prefix', async () => {
Expand Down

0 comments on commit b5afd11

Please sign in to comment.