Skip to content

Commit

Permalink
Remove :visited
Browse files Browse the repository at this point in the history
  • Loading branch information
asamuzaK committed Nov 2, 2024
1 parent e78a014 commit 5fe2f6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ALPHA_NUM = '[A-Z\\d]+';
export const CHILD_IDX = '(?:first|last|only)-(?:child|of-type)';
export const DIGIT = '(?:0|[1-9]\\d*)';
export const LANG_PART = `(?:-${ALPHA_NUM})*`;
export const PSEUDO_CLASS = `(?:any-)?link|${CHILD_IDX}|(?:en|dis)abled|checked|empty|indeterminate|read-(?:only|write)|root|target|visited`;
export const PSEUDO_CLASS = `(?:any-)?link|${CHILD_IDX}|(?:en|dis)abled|checked|empty|indeterminate|read-(?:only|write)|root|target`;
export const ANB =
`[+-]?(?:${DIGIT}n?|n)|(?:[+-]?${DIGIT})?n\\s*[+-]\\s*${DIGIT}`;
// N_TH: excludes An+B with selector list, e.g. :nth-child(2n+1 of .foo)
Expand Down
5 changes: 5 additions & 0 deletions test/utility.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,11 @@ describe('utility functions', () => {
assert.isTrue(res, 'result');
});

it('should get false', () => {
const res = func(':visited');
assert.isFalse(res, 'result');
});

it('should get false', () => {
const res = func(':after');
assert.isFalse(res, 'result');
Expand Down

0 comments on commit 5fe2f6b

Please sign in to comment.