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

Add NoSmartQuotes lint to reject smart quotes in EIPs #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sumitvekariya
Copy link

Description

This PR implements a new lint rule to reject smart quotes in EIPs, resolving issue #129.

Smart quotes (", ", ', ') can be problematic in EIPs, especially in code blocks where they can cause syntax errors. This new lint detects these characters and suggests replacing them with straight quotes (", ').

Changes:

  1. Created a new lint implementation NoSmartQuotes that detects Unicode smart quotes in markdown content
  2. Added tests to verify the lint correctly identifies smart quotes in text, code blocks, and other contexts
  3. The lint ignores straight quotes and only flags actual smart quotes

Files changed:

  • Added eipw-lint/src/lints/markdown/no_smart_quotes.rs - Implements the lint rule
  • Added eipw-lint/tests/lint_markdown_no_smart_quotes.rs - Tests for the new lint
  • Modified eipw-lint/src/lints/markdown.rs - Registered the new lint module
  • Modified eipw-lint/src/lints/known_lints.rs - Added the new lint to the DefaultLint enum

Fixes #129

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.

Create a lint to reject smart quotes
1 participant