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

Allow multiple hashtags to start comments at the beginning of a line. #6146

Merged

Conversation

Moderocky
Copy link
Member

Description

Any number of hashtags can be used to begin a comment, if and only if they are at the beginning of a line.

All of the comments here are comments.

# hello comment 1
## hello comment 2
broadcast "ok ## hashtag"
broadcast "ok" # comment
###### comment
# ## comment

The following would not be a comment since it does not begin a line.

broadcast "hello" ## NOT A COMMENT

Target Minecraft Versions: any
Requirements: none
Related Issues: #1211

@Moderocky
Copy link
Member Author

The JUnit test will need changing for this to work, I'll get around to that some time.

@TheLimeGlass
Copy link
Collaborator

TP made an enhancement not too long ago where you didn't need to require double quotes in string expressions inside strings, maybe that could also be looked at here to allow single pound signs, this can be accomplished by not interrupting the string parse for a comment, and also detectable if the quotes isn't finished.

@sovdeeth sovdeeth added enhancement Feature request, an issue about something that could be improved, or a PR improving something. hacktoberfest-accepted Marks a PR as accepted for Hacktoberfest labels Oct 26, 2023
@sovdeeth sovdeeth added the 2.8 Targeting a 2.8.X version release label Dec 30, 2023
@sovdeeth sovdeeth added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Dec 30, 2023
@APickledWalrus APickledWalrus merged commit 967f9ee into SkriptLang:dev/feature Dec 30, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8 Targeting a 2.8.X version release enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. hacktoberfest-accepted Marks a PR as accepted for Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants