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

fix(helper): fix getHeaders function #342

Merged
merged 3 commits into from
Jan 16, 2025
Merged

fix(helper): fix getHeaders function #342

merged 3 commits into from
Jan 16, 2025

Conversation

Mister-Hope
Copy link
Member

No description provided.

Copy link

netlify bot commented Jan 16, 2025

Deploy Preview for vuepress-ecosystem ready!

Name Link
🔨 Latest commit aacea31
🔍 Latest deploy log https://app.netlify.com/sites/vuepress-ecosystem/deploys/678913b1bbcc2700084e38e4
😎 Deploy Preview https://deploy-preview-342--vuepress-ecosystem.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Mister-Hope
Copy link
Member Author

@pengzhanbo This PR fixes some bugs that you include in the original PR:

  1. The element type should be HTMLHeadingElement instead of HTMLHeadElement (which is the type of <head>)
  2. The slug key is available in the result, while the type does not include it.

Also it includes some improvements:

  1. Reuse PageHeader from vuepress/shared instead of declaring a same one
  2. Extract logic and provide a getHeadersFromDom function
  3. Rename MenuItem to HeaderItem

@coveralls
Copy link

coveralls commented Jan 16, 2025

Pull Request Test Coverage Report for Build 12810682982

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 59.625%

Totals Coverage Status
Change from base Build 12809756972: 0.0%
Covered Lines: 1336
Relevant Lines: 2026

💛 - Coveralls

@Mister-Hope Mister-Hope merged commit df653e7 into main Jan 16, 2025
34 checks passed
@Mister-Hope Mister-Hope deleted the get-headers branch January 16, 2025 14:14
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.

2 participants