Skip to content

Commit 8d29dba

Browse files
Copilotneilime
andcommitted
Fix @font-face at-rule name parsing by removing trailing brace
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
1 parent 1ce14cc commit 8d29dba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CssLint/Tokenizer/Parser/AtRuleParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,13 @@ private function getAtRuleName(TokenizerContext $tokenizerContext): string
106106
{
107107
$content = trim($tokenizerContext->getCurrentContent());
108108
$parts = explode(' ', trim($content), 2);
109-
return trim(
109+
$name = trim(
110110
$this->removeStartingString(
111111
$parts[0],
112112
self::$AT_RULE_START
113113
)
114114
);
115+
return $this->removeEndingString($name, BlockParser::$BLOCK_START);
115116
}
116117

117118
private function getAtRuleValue(TokenizerContext $tokenizerContext): ?string

0 commit comments

Comments
 (0)