Skip to content

Fix column position for font-family-name-quotes rule#5955

Merged
ybiquitous merged 1 commit intomainfrom
fix-column-position-for-font-family-name-quotes
Mar 8, 2022
Merged

Fix column position for font-family-name-quotes rule#5955
ybiquitous merged 1 commit intomainfrom
fix-column-position-for-font-family-name-quotes

Conversation

@ybiquitous
Copy link
Copy Markdown
Member

Which issue, if any, is this issue related to?

Extracted from #5725. This change should make it easier to support a column range.

Is there anything in the PR that needs further explanation?

This change fixes a column position of a font-family-name-quotes problem to include quotes.

a { font-family: "Arial"; }
/* Before:        ↑ */

a { font-family: "Arial"; }
/* After:        ↑ */

This change fixes a column position of a `font-family-name-quotes` problem to include quotes.

```css
a { font-family: "Arial"; }
/* Before:        ↑ */

a { font-family: "Arial"; }
/* After:        ↑ */
```
fixed: 'a { font-family: "Lucida Grande", "Arial", sans-serif; }',
message: messages.rejected('sans-serif'),
line: 1,
column: 45,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[note] I've removed checking a position from fix: true test cases since they are duplicated with the non-fix test cases above. No problems?

const mutableNodes = [];

fontFamilies.forEach((fontFamily, idx) => {
const quote = 'quote' in fontFamily && fontFamily.quote;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[note] The StringNode#quote property holds an actual quote like " or '.

Copy link
Copy Markdown
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@ybiquitous ybiquitous merged commit dbfc408 into main Mar 8, 2022
@ybiquitous ybiquitous deleted the fix-column-position-for-font-family-name-quotes branch March 8, 2022 09:26
@ybiquitous
Copy link
Copy Markdown
Member Author

@jeddy3 Thank you for the review! I've updated the changelog:

  • Fixed: font-family-name-quotes column position (#5955).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants