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

Improve attribute detection regex #4

Merged
merged 3 commits into from
Aug 17, 2024
Merged

Improve attribute detection regex #4

merged 3 commits into from
Aug 17, 2024

Conversation

j9t
Copy link
Owner

@j9t j9t commented Aug 17, 2024

Adjusted the regular expression to better identify obsolete attributes, including those with minimized forms. Updated tests to handle new minimized attribute cases and ensure comprehensive coverage.

Summary by CodeRabbit

  • New Features
    • Added an "Acknowledgments" section in the README to recognize contributors to the project.
  • Bug Fixes
    • Enhanced the detection of obsolete attributes in HTML, improving accuracy and robustness.
  • Tests
    • Expanded test coverage by adding a new test case for detecting obsolete minimized attributes.
  • Chores
    • Updated the package version from 1.3.2 to 1.4.0, indicating new features or improvements.

Adjusted the regular expression to better identify obsolete attributes, including those with minimized forms. Updated tests to handle new minimized attribute cases and ensure comprehensive coverage.

Signed-off-by: Jens Oliver Meiert <[email protected]>
Updated version in package.json and package-lock.json from 1.3.2 to 1.4.0. This includes necessary adjustments to dependencies and ensures consistency across the project files.

Signed-off-by: Jens Oliver Meiert <[email protected]>
Copy link

coderabbitai bot commented Aug 17, 2024

Walkthrough

This update enhances the project by adding an "Acknowledgments" section to the README.md, recognizing key contributors. The core functionality in the bin/obsohtml.js file is improved through a refined regex for detecting obsolete HTML attributes. The testing suite in bin/obsohtml.test.js is expanded with new test cases and improved file management. Additionally, the package version in package.json is incremented, reflecting overall enhancements and updates.

Changes

File(s) Change Summary
README.md Added an "Acknowledgments" section recognizing contributions from @mattbrundage and @FabianBeiner.
bin/obsohtml.js Updated regex in findObsolete function to improve detection of obsolete attributes.
bin/obsohtml.test.js Renamed a test file, added a new test file for minimized attributes, and added a test case for detection.
package.json Updated package version from 1.3.2 to 1.4.0.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Included acknowledgments for contributors in the README. This recognizes the efforts of @mattbrundage and @FabianBeiner in improving the project.

Signed-off-by: Jens Oliver Meiert <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
README.md (1)

81-83: Consider improving the phrasing in the Acknowledgments section.

The phrase "for helping to make ObsoHTML better" could be rephrased for better clarity and style.

- Thanks to @mattbrundage and @FabianBeiner for helping to make ObsoHTML better!
+ Thanks to @mattbrundage and @FabianBeiner for their contributions to improving ObsoHTML!
Tools
LanguageTool

[style] ~83-~83: The wording of this phrase can be improved.
Context: ...undage and @FabianBeiner for helping to make ObsoHTML better!

(MAKE_STYLE_BETTER)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7f8b300 and 585a460.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (4)
  • README.md (1 hunks)
  • bin/obsohtml.js (1 hunks)
  • bin/obsohtml.test.js (3 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • package.json
Additional context used
LanguageTool
README.md

[style] ~83-~83: The wording of this phrase can be improved.
Context: ...undage and @FabianBeiner for helping to make ObsoHTML better!

(MAKE_STYLE_BETTER)

Additional comments not posted (2)
bin/obsohtml.test.js (1)

Line range hint 8-56:
Test suite updates look good!

The changes improve test coverage by adding a new test for minimized attributes and ensuring proper setup and teardown of test files.

bin/obsohtml.js (1)

37-37: Regex update enhances attribute detection.

The refined regex pattern improves the detection of obsolete attributes, particularly in minimized forms, enhancing the robustness of the detection logic.

@j9t j9t merged commit 585a460 into main Aug 17, 2024
1 check passed
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.

1 participant