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

feature request: allow free text after @since #5

Closed
shunkica opened this issue Jul 21, 2023 · 2 comments · Fixed by #6
Closed

feature request: allow free text after @since #5

shunkica opened this issue Jul 21, 2023 · 2 comments · Fixed by #6
Labels

Comments

@shunkica
Copy link

Summary:

Extend flexibility to accept any text following the @since tag, not just version numbers.

The current behavior of the library enforces the @since tag to be followed by a version number. Any text after the tag that isn't recognized as a version number is automatically moved to a new line. This isn't accommodating for cases where the @SInCE tag needs to be followed by descriptors other than version numbers (e.g., @since DOM L3 Core).

Current Behavior:

If the @SInCE tag is followed by multiple words, the remaining text is pushed to a new line, like so:

@since DOM
L3 Core

Proposed Feature:

Option 1. Introduce a new configuration option, for example jsdocAllowSinceText, that would allow any text to follow the @since tag and remain on the same line.

Option 2. Allow any text to follow @since by default

The expected behavior would be as follows:

@since DOM L3 Core

Benefits:

Provides greater flexibility in using the @since tag, accommodating a wider range of use cases.
@homer0
Copy link
Owner

homer0 commented Jul 22, 2023

This is similar to the solution I mentioned in #3; I just had to move @since to the getTagsWithNameAsDescription group, and since the name is never pushed to a new line, it's always next to the tag :).

You can get it on v6 by overriding getTagsWithNameAsDescription and adding it to the list, but... I added an extra fix that won't be so easy to bring to v6: It didn't make sense to add the sentence formatting (Uppercase & period at the end) to @since, so I added a new constant and check for tags where the formatting shouldn't happen.

Here's the commit if you want to replicate it.

@homer0 homer0 closed this as completed in #6 Jul 22, 2023
@github-actions
Copy link

🎉 This issue has been resolved in version 7.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants