Skip to content

feat: add no-space-in-emphasis rule #403

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Pixel998
Copy link
Contributor

@Pixel998 Pixel998 commented Jun 2, 2025

Prerequisites checklist

What is the purpose of this pull request?

This PR implements the no-space-in-emphasis rule to disallow spaces around emphasis markers.

What changes did you make? (Give an overview)

Implemented the no-space-in-emphasis rule, along with documentation and tests.

Related Issues

Fixes #378

Is there anything you'd like reviewers to focus on?

@Pixel998 Pixel998 marked this pull request as draft June 2, 2025 14:24
@lumirlumir lumirlumir linked an issue Jun 3, 2025 that may be closed by this pull request
1 task
@lumirlumir lumirlumir added this to Triage Jun 3, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jun 3, 2025
@lumirlumir lumirlumir mentioned this pull request Jun 5, 2025
1 task
@nzakas nzakas moved this from Needs Triage to Implementing in Triage Jun 10, 2025
@snitin315
Copy link
Contributor

@Pixel998 Make sure to mark it as ready for review once done, the team doesn't pay attention to draft PRs.

@snitin315
Copy link
Contributor

@Pixel998 Are you still working on this?

@Pixel998 Pixel998 marked this pull request as ready for review June 22, 2025 05:38
@snitin315
Copy link
Contributor

snitin315 commented Jun 23, 2025

We have false negatives in case of nested emphasis:

<!-- eslint markdown/no-space-in-emphasis: "error" -->

_ **bold** _ // no error

This is * italic with __ bold __ markdown * // No error reported

This is *italic with __ bold __ markdown* // Reports error for bold emphasis as expected

@snitin315
Copy link
Contributor

Following is an edge case, I'm not sure if we want to solve for it in the initial version.

**** bold **** // No error, 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

New Rule: no-space-in-emphasis
3 participants