Skip to content

refactor: use strict equality in RegExp exec checks#3935

Open
singhankit001 wants to merge 1 commit intomarkedjs:masterfrom
singhankit001:fix/strict-equality
Open

refactor: use strict equality in RegExp exec checks#3935
singhankit001 wants to merge 1 commit intomarkedjs:masterfrom
singhankit001:fix/strict-equality

Conversation

@singhankit001
Copy link
Copy Markdown

This PR refactors != null to !== null for RegExp.exec return value checks in src/Lexer.ts and src/Tokenizer.ts.\nSince RegExp.exec only returns RegExpExecArray or null, !== perfectly aligns with the required behavior and improves strict equality consistency across the codebase.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

@singhankit001 is attempting to deploy a commit to the MarkedJS Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates several while loop conditions in Lexer.ts and Tokenizer.ts to use strict inequality (!== null) instead of loose inequality (!= null) when checking the result of RegExp.exec(). I have no feedback to provide.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marked-website Ready Ready Preview, Comment Apr 1, 2026 6:57am

Request Review

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