Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add :line-numbers=number supports #161

Merged
merged 11 commits into from
May 29, 2024
Merged

feat: add :line-numbers=number supports #161

merged 11 commits into from
May 29, 2024

Conversation

pengzhanbo
Copy link
Member

@pengzhanbo pengzhanbo commented May 28, 2024

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Other

Description

@coveralls
Copy link

coveralls commented May 28, 2024

Pull Request Test Coverage Report for Build 9280691180

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 56.66%

Totals Coverage Status
Change from base Build 9280606156: 0.2%
Covered Lines: 1002
Relevant Lines: 1582

💛 - Coveralls

@Mister-Hope
Copy link
Member

can we split these 2 changes?

@pengzhanbo
Copy link
Member Author

can we split these 2 changes?

I moved the attribute migration to another PR.

@@ -229,7 +229,6 @@ div[class*='language-'] {
padding-top: 1.3rem;
font-size: 0.875em;
line-height: $line-height;
counter-reset: line-number;
Copy link
Member

Choose a reason for hiding this comment

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

239-242 should be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do not remove, currently using counter-increment for line numbering.

Copy link
Member

@Mister-Hope Mister-Hope May 29, 2024

Choose a reason for hiding this comment

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

I think its ok for you to use actual numbers like vitepress.

By this, the line number is coupled with an outside style.

But if we want the style built-in, then I think this should be fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

When writing numbers into the DOM, plugin-seo includes the numbers from line-numbers in the og:description, but it does not include the code blocks content, which seems a bit strange. Perhaps plugin-seo needs to make some adjustments.

Copy link
Member

@Mister-Hope Mister-Hope left a comment

Choose a reason for hiding this comment

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

Please resolve the conflicts

@Mister-Hope Mister-Hope merged commit a0a7288 into main May 29, 2024
32 checks passed
@Mister-Hope Mister-Hope deleted the highlight branch May 29, 2024 05:26
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.

3 participants