Skip to content

Commit

Permalink
Extend pseudo-elements support byond ::before/::after
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Aug 11, 2019
1 parent aa85cdd commit 2c39a1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/js/scriptlets/cosmetic-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const loggedSelectors = new Set();

/******************************************************************************/

const rePseudoElements = /::?(?:after|before)$/;
const rePseudoElements = /:(?::?after|:?before|:[a-z-]+)$/;

const safeMatchSelector = function(selector, context) {
const safeSelector = rePseudoElements.test(selector)
Expand Down
2 changes: 1 addition & 1 deletion src/js/scriptlets/element-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ const filtersFrom = function(x, y) {
const filterToDOMInterface = (( ) => {
const reHnAnchorPrefix = '^[\\w-]+://(?:[^/?#]+\\.)?';
const reCaret = '(?:[^%.0-9a-z_-]|$)';
const rePseudoElements = /::?(?:after|before)$/;
const rePseudoElements = /:(?::?after|:?before|:[a-z-]+)$/;

// Net filters: we need to lookup manually -- translating into a foolproof
// CSS selector is just not possible.
Expand Down

0 comments on commit 2c39a1a

Please sign in to comment.