Skip to content

Commit

Permalink
fix(js_lexer): regex escape char (#2044)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant authored Mar 11, 2024
1 parent 57fa936 commit 5223bc8
Show file tree
Hide file tree
Showing 111 changed files with 7,747 additions and 7,722 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

### Parser

#### Bug fixes

- JavaScript lexer is now able to lex regular expression literals with escaped non-ascii chars ([#1941](https://github.com/biomejs/biome/issues/1941)).

Contributed by @Sec-ant

## 1.6.0 (2024-03-08)

Expand Down
16 changes: 8 additions & 8 deletions crates/biome_css_formatter/src/css/any/at_rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ impl FormatRule<AnyCssAtRule> for FormatAnyCssAtRule {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssAtRule, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssAtRule::CssBogusAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssCharsetAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssColorProfileAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssCounterStyleAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssContainerAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssCounterStyleAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssDocumentAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssFontFaceAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssFontFeatureValuesAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssFontPaletteValuesAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssImportAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssKeyframesAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssLayerAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssMediaAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssNamespaceAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssPageAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssLayerAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssSupportsAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssPropertyAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssScopeAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssImportAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssNamespaceAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssStartingStyleAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssDocumentAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssBogusAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssPropertyAtRule(node) => node.format().fmt(f),
AnyCssAtRule::CssSupportsAtRule(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssAttributeMatcherValue> for FormatAnyCssAttributeMatcherVal
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssAttributeMatcherValue, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssAttributeMatcherValue::CssString(node) => node.format().fmt(f),
AnyCssAttributeMatcherValue::CssIdentifier(node) => node.format().fmt(f),
AnyCssAttributeMatcherValue::CssString(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssCompoundSelector> for FormatAnyCssCompoundSelector {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssCompoundSelector, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssCompoundSelector::CssCompoundSelector(node) => node.format().fmt(f),
AnyCssCompoundSelector::CssBogusSelector(node) => node.format().fmt(f),
AnyCssCompoundSelector::CssCompoundSelector(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ impl FormatRule<AnyCssContainerAndCombinableQuery> for FormatAnyCssContainerAndC
f: &mut CssFormatter,
) -> FormatResult<()> {
match node {
AnyCssContainerAndCombinableQuery::CssContainerAndQuery(node) => node.format().fmt(f),
AnyCssContainerAndCombinableQuery::AnyCssContainerQueryInParens(node) => {
node.format().fmt(f)
}
AnyCssContainerAndCombinableQuery::CssContainerAndQuery(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ impl FormatRule<AnyCssContainerOrCombinableQuery> for FormatAnyCssContainerOrCom
f: &mut CssFormatter,
) -> FormatResult<()> {
match node {
AnyCssContainerOrCombinableQuery::CssContainerOrQuery(node) => node.format().fmt(f),
AnyCssContainerOrCombinableQuery::AnyCssContainerQueryInParens(node) => {
node.format().fmt(f)
}
AnyCssContainerOrCombinableQuery::CssContainerOrQuery(node) => node.format().fmt(f),
}
}
}
4 changes: 2 additions & 2 deletions crates/biome_css_formatter/src/css/any/container_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ impl FormatRule<AnyCssContainerQuery> for FormatAnyCssContainerQuery {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssContainerQuery, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssContainerQuery::AnyCssContainerQueryInParens(node) => node.format().fmt(f),
AnyCssContainerQuery::CssContainerAndQuery(node) => node.format().fmt(f),
AnyCssContainerQuery::CssContainerNotQuery(node) => node.format().fmt(f),
AnyCssContainerQuery::CssContainerOrQuery(node) => node.format().fmt(f),
AnyCssContainerQuery::CssContainerAndQuery(node) => node.format().fmt(f),
AnyCssContainerQuery::AnyCssContainerQueryInParens(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ impl FormatRule<AnyCssContainerStyleOrCombinableQuery>
f: &mut CssFormatter,
) -> FormatResult<()> {
match node {
AnyCssContainerStyleOrCombinableQuery::CssContainerStyleOrQuery(node) => {
AnyCssContainerStyleOrCombinableQuery::CssContainerStyleInParens(node) => {
node.format().fmt(f)
}
AnyCssContainerStyleOrCombinableQuery::CssContainerStyleInParens(node) => {
AnyCssContainerStyleOrCombinableQuery::CssContainerStyleOrQuery(node) => {
node.format().fmt(f)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ impl FormatRule<AnyCssContainerStyleQuery> for FormatAnyCssContainerStyleQuery {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssContainerStyleQuery, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssContainerStyleQuery::CssContainerStyleNotQuery(node) => node.format().fmt(f),
AnyCssContainerStyleQuery::CssContainerStyleAndQuery(node) => node.format().fmt(f),
AnyCssContainerStyleQuery::CssContainerStyleInParens(node) => node.format().fmt(f),
AnyCssContainerStyleQuery::CssContainerStyleNotQuery(node) => node.format().fmt(f),
AnyCssContainerStyleQuery::CssContainerStyleOrQuery(node) => node.format().fmt(f),
AnyCssContainerStyleQuery::CssDeclaration(node) => node.format().fmt(f),
AnyCssContainerStyleQuery::CssContainerStyleInParens(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssDeclarationListBlock> for FormatAnyCssDeclarationListBlock
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDeclarationListBlock, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDeclarationListBlock::CssDeclarationListBlock(node) => node.format().fmt(f),
AnyCssDeclarationListBlock::CssBogusBlock(node) => node.format().fmt(f),
AnyCssDeclarationListBlock::CssDeclarationListBlock(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/declaration_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssDeclarationName> for FormatAnyCssDeclarationName {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDeclarationName, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDeclarationName::CssIdentifier(node) => node.format().fmt(f),
AnyCssDeclarationName::CssDashedIdentifier(node) => node.format().fmt(f),
AnyCssDeclarationName::CssIdentifier(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssDeclarationOrAtRule> for FormatAnyCssDeclarationOrAtRule {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDeclarationOrAtRule, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDeclarationOrAtRule::CssDeclarationWithSemicolon(node) => node.format().fmt(f),
AnyCssDeclarationOrAtRule::CssAtRule(node) => node.format().fmt(f),
AnyCssDeclarationOrAtRule::CssDeclarationWithSemicolon(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ impl FormatRule<AnyCssDeclarationOrAtRuleBlock> for FormatAnyCssDeclarationOrAtR
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDeclarationOrAtRuleBlock, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDeclarationOrAtRuleBlock::CssBogusBlock(node) => node.format().fmt(f),
AnyCssDeclarationOrAtRuleBlock::CssDeclarationOrAtRuleBlock(node) => {
node.format().fmt(f)
}
AnyCssDeclarationOrAtRuleBlock::CssBogusBlock(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ impl FormatRule<AnyCssDeclarationOrRule> for FormatAnyCssDeclarationOrRule {
fn fmt(&self, node: &AnyCssDeclarationOrRule, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDeclarationOrRule::AnyCssRule(node) => node.format().fmt(f),
AnyCssDeclarationOrRule::CssDeclarationWithSemicolon(node) => node.format().fmt(f),
AnyCssDeclarationOrRule::CssBogus(node) => node.format().fmt(f),
AnyCssDeclarationOrRule::CssDeclarationWithSemicolon(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssDeclarationOrRuleBlock> for FormatAnyCssDeclarationOrRuleB
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDeclarationOrRuleBlock, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDeclarationOrRuleBlock::CssDeclarationOrRuleBlock(node) => node.format().fmt(f),
AnyCssDeclarationOrRuleBlock::CssBogusBlock(node) => node.format().fmt(f),
AnyCssDeclarationOrRuleBlock::CssDeclarationOrRuleBlock(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/dimension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ impl FormatRule<AnyCssDimension> for FormatAnyCssDimension {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDimension, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDimension::CssPercentage(node) => node.format().fmt(f),
AnyCssDimension::CssRegularDimension(node) => node.format().fmt(f),
AnyCssDimension::CssUnknownDimension(node) => node.format().fmt(f),
AnyCssDimension::CssPercentage(node) => node.format().fmt(f),
}
}
}
4 changes: 2 additions & 2 deletions crates/biome_css_formatter/src/css/any/document_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ impl FormatRule<AnyCssDocumentMatcher> for FormatAnyCssDocumentMatcher {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssDocumentMatcher, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssDocumentMatcher::CssUrlFunction(node) => node.format().fmt(f),
AnyCssDocumentMatcher::CssDocumentCustomMatcher(node) => node.format().fmt(f),
AnyCssDocumentMatcher::CssBogusDocumentMatcher(node) => node.format().fmt(f),
AnyCssDocumentMatcher::CssDocumentCustomMatcher(node) => node.format().fmt(f),
AnyCssDocumentMatcher::CssUrlFunction(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ impl FormatRule<AnyCssExpression> for FormatAnyCssExpression {
fn fmt(&self, node: &AnyCssExpression, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssExpression::CssBinaryExpression(node) => node.format().fmt(f),
AnyCssExpression::CssParenthesizedExpression(node) => node.format().fmt(f),
AnyCssExpression::CssListOfComponentValuesExpression(node) => node.format().fmt(f),
AnyCssExpression::CssParenthesizedExpression(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssFontFeatureValuesBlock> for FormatAnyCssFontFeatureValuesB
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssFontFeatureValuesBlock, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssFontFeatureValuesBlock::CssFontFeatureValuesBlock(node) => node.format().fmt(f),
AnyCssFontFeatureValuesBlock::CssBogusBlock(node) => node.format().fmt(f),
AnyCssFontFeatureValuesBlock::CssFontFeatureValuesBlock(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ impl FormatRule<AnyCssFontFeatureValuesItem> for FormatAnyCssFontFeatureValuesIt
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssFontFeatureValuesItem, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssFontFeatureValuesItem::CssFontFeatureValuesItem(node) => node.format().fmt(f),
AnyCssFontFeatureValuesItem::CssBogusFontFeatureValuesItem(node) => {
node.format().fmt(f)
}
AnyCssFontFeatureValuesItem::CssFontFeatureValuesItem(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/import_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssImportUrl> for FormatAnyCssImportUrl {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssImportUrl, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssImportUrl::CssUrlFunction(node) => node.format().fmt(f),
AnyCssImportUrl::CssString(node) => node.format().fmt(f),
AnyCssImportUrl::CssUrlFunction(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/keyframes_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssKeyframesBlock> for FormatAnyCssKeyframesBlock {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssKeyframesBlock, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssKeyframesBlock::CssKeyframesBlock(node) => node.format().fmt(f),
AnyCssKeyframesBlock::CssBogusBlock(node) => node.format().fmt(f),
AnyCssKeyframesBlock::CssKeyframesBlock(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/keyframes_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssKeyframesItem> for FormatAnyCssKeyframesItem {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssKeyframesItem, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssKeyframesItem::CssKeyframesItem(node) => node.format().fmt(f),
AnyCssKeyframesItem::CssBogusKeyframesItem(node) => node.format().fmt(f),
AnyCssKeyframesItem::CssKeyframesItem(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ impl FormatRule<AnyCssKeyframesSelector> for FormatAnyCssKeyframesSelector {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssKeyframesSelector, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssKeyframesSelector::CssBogusSelector(node) => node.format().fmt(f),
AnyCssKeyframesSelector::CssKeyframesIdentSelector(node) => node.format().fmt(f),
AnyCssKeyframesSelector::CssKeyframesPercentageSelector(node) => node.format().fmt(f),
AnyCssKeyframesSelector::CssBogusSelector(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ impl FormatRule<AnyCssLayer> for FormatAnyCssLayer {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssLayer, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssLayer::CssBogusLayer(node) => node.format().fmt(f),
AnyCssLayer::CssLayerDeclaration(node) => node.format().fmt(f),
AnyCssLayer::CssLayerReference(node) => node.format().fmt(f),
AnyCssLayer::CssBogusLayer(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ impl FormatRule<AnyCssMediaAndCombinableCondition> for FormatAnyCssMediaAndCombi
f: &mut CssFormatter,
) -> FormatResult<()> {
match node {
AnyCssMediaAndCombinableCondition::CssMediaAndCondition(node) => node.format().fmt(f),
AnyCssMediaAndCombinableCondition::AnyCssMediaInParens(node) => node.format().fmt(f),
AnyCssMediaAndCombinableCondition::CssMediaAndCondition(node) => node.format().fmt(f),
}
}
}
4 changes: 2 additions & 2 deletions crates/biome_css_formatter/src/css/any/media_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ impl FormatRule<AnyCssMediaCondition> for FormatAnyCssMediaCondition {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssMediaCondition, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssMediaCondition::CssMediaNotCondition(node) => node.format().fmt(f),
AnyCssMediaCondition::AnyCssMediaInParens(node) => node.format().fmt(f),
AnyCssMediaCondition::CssMediaAndCondition(node) => node.format().fmt(f),
AnyCssMediaCondition::CssMediaNotCondition(node) => node.format().fmt(f),
AnyCssMediaCondition::CssMediaOrCondition(node) => node.format().fmt(f),
AnyCssMediaCondition::AnyCssMediaInParens(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ impl FormatRule<AnyCssMediaOrCombinableCondition> for FormatAnyCssMediaOrCombina
f: &mut CssFormatter,
) -> FormatResult<()> {
match node {
AnyCssMediaOrCombinableCondition::CssMediaOrCondition(node) => node.format().fmt(f),
AnyCssMediaOrCombinableCondition::AnyCssMediaInParens(node) => node.format().fmt(f),
AnyCssMediaOrCombinableCondition::CssMediaOrCondition(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/media_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ impl FormatRule<AnyCssMediaQuery> for FormatAnyCssMediaQuery {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssMediaQuery, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssMediaQuery::CssMediaConditionQuery(node) => node.format().fmt(f),
AnyCssMediaQuery::AnyCssMediaTypeQuery(node) => node.format().fmt(f),
AnyCssMediaQuery::CssBogusMediaQuery(node) => node.format().fmt(f),
AnyCssMediaQuery::CssMediaConditionQuery(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ impl FormatRule<AnyCssMediaTypeCondition> for FormatAnyCssMediaTypeCondition {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssMediaTypeCondition, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssMediaTypeCondition::CssMediaNotCondition(node) => node.format().fmt(f),
AnyCssMediaTypeCondition::CssMediaAndCondition(node) => node.format().fmt(f),
AnyCssMediaTypeCondition::AnyCssMediaInParens(node) => node.format().fmt(f),
AnyCssMediaTypeCondition::CssMediaAndCondition(node) => node.format().fmt(f),
AnyCssMediaTypeCondition::CssMediaNotCondition(node) => node.format().fmt(f),
}
}
}
2 changes: 1 addition & 1 deletion crates/biome_css_formatter/src/css/any/namespace_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssNamespaceUrl> for FormatAnyCssNamespaceUrl {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssNamespaceUrl, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssNamespaceUrl::CssUrlFunction(node) => node.format().fmt(f),
AnyCssNamespaceUrl::CssString(node) => node.format().fmt(f),
AnyCssNamespaceUrl::CssUrlFunction(node) => node.format().fmt(f),
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ impl FormatRule<AnyCssPageAtRuleBlock> for FormatAnyCssPageAtRuleBlock {
type Context = CssFormatContext;
fn fmt(&self, node: &AnyCssPageAtRuleBlock, f: &mut CssFormatter) -> FormatResult<()> {
match node {
AnyCssPageAtRuleBlock::CssPageAtRuleBlock(node) => node.format().fmt(f),
AnyCssPageAtRuleBlock::CssBogusBlock(node) => node.format().fmt(f),
AnyCssPageAtRuleBlock::CssPageAtRuleBlock(node) => node.format().fmt(f),
}
}
}
Loading

0 comments on commit 5223bc8

Please sign in to comment.