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

Update MD_HEADER_REGEXP to require at least 4 equals signs #16

Closed

Conversation

Ayoub-Mabrouk
Copy link

updates the regular expression for validating the header in HISTORY.md. The new pattern enforces at least 4 consecutive equals signs (=) instead of any number of equals signs.

Changes:
Old RegExp: /^====*$/ (allowed any number of equals signs).
New RegExp: /^={4,}$/ (requires at least 4 equals signs).
Rationale:
This ensures a more consistent and readable header format in HISTORY.md

@UlisesGascon
Copy link
Member

Hey @Ayoub-Mabrouk!

Thanks for this PR! While the readability is much better the performance has being decreased. I created this small POC to showcase the difference

regex-for-at-least-4-equal-signs

@wesleytodd
Copy link
Member

wesleytodd commented Nov 12, 2024

Also, we will be getting rid of this integration in the near future. I would not worry too much about the readability OR the performance for this. expressjs/discussions#293

EDIT: Oops, I did not mean to click the close button. That said, @Ayoub-Mabrouk I would recommend engaging in the thread I linked and maybe you can help us improve the history files for the entire project? Feel free to re-open if you would rather continue to engage on this one.

@wesleytodd wesleytodd closed this Nov 12, 2024
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.

3 participants