Skip to content

Commit 519a80d

Browse files
Merge branch '2.8' into 3.4
* 2.8: (29 commits) [Console] Fix docblock of DescriptorInterface::describe [Config] Handle nullable node name + fix inheritdocs [Security] added userChecker to SimpleAuthenticationProvider [Debug] fix test Fix typo in test method name Fixes #26563 (open_basedir restriction in effect) [Debug] Reset previous exception handler ealier to prevent infinite loop add hint in Github pull request template [Validator] Fix docblock of ClassMetadata#members [BrowserKit] Fix cookie path handling when $domain is null [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore [BrowserKit] Improves CookieJar::get [BrowserKit] Fix Cookie's PHPDoc [DomCrawler] Change bad wording in ChoiceFormField::untick [DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue [DomCrawler] Avoid a useless call to strtolower [FrameworkBundle] HttpCache is not longer abstract Php Inspections (EA Ultimate): address some of one-time used local variables [Intl] Load locale aliases to support alias fallbacks [CssSelector] Fix CSS identifiers parsing - they can start with dash ...
2 parents 544655f + 3cdc270 commit 519a80d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Parser/Tokenizer/TokenizerPatterns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct()
4646
$this->nonAsciiPattern = '[^\x00-\x7F]';
4747
$this->nmCharPattern = '[_a-z0-9-]|'.$this->escapePattern.'|'.$this->nonAsciiPattern;
4848
$this->nmStartPattern = '[_a-z]|'.$this->escapePattern.'|'.$this->nonAsciiPattern;
49-
$this->identifierPattern = '(?:'.$this->nmStartPattern.')(?:'.$this->nmCharPattern.')*';
49+
$this->identifierPattern = '-?(?:'.$this->nmStartPattern.')(?:'.$this->nmCharPattern.')*';
5050
$this->hashPattern = '#((?:'.$this->nmCharPattern.')+)';
5151
$this->numberPattern = '[+-]?(?:[0-9]*\.[0-9]+|[0-9]+)';
5252
$this->quotedStringPattern = '([^\n\r\f%s]|'.$this->stringEscapePattern.')*';

Tests/Parser/ParserTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ public function getPseudoElementsTestData()
186186
array('foo:after', 'Element[foo]', 'after'),
187187
array('foo::selection', 'Element[foo]', 'selection'),
188188
array('lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'),
189+
array('video::-webkit-media-controls', 'Element[video]', '-webkit-media-controls'),
189190
);
190191
}
191192

0 commit comments

Comments
 (0)