Skip to content

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Sep 24, 2021

  • move to real regexes
  • allow for '>' in content-['>']

Fixes: #5334

These regexes are only calculated once so we don't really have a
performance penalty here. However, it's a bit nicer to do it this way
because now you don't have to think about the proper escapes.

/.*/.source will basically take the source of the regex ".*" without
flags and converts it to a string with the proper escapes for you.

Fun fact, this `.source` property has been supported since Chrome,
Firefox and Safari version 1.
@RobinMalfait RobinMalfait changed the title fix angle brackets in content Fix angle brackets in content Sep 24, 2021
@RobinMalfait RobinMalfait merged commit a4d1bdb into master Sep 24, 2021
@RobinMalfait RobinMalfait deleted the fix-angle-brackets-in-content branch September 24, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

before:content-['>'] doesn't work

2 participants