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

String entries don't allow surrounding quotations #7070

Open
1 task done
Fusezion opened this issue Sep 12, 2024 · 4 comments
Open
1 task done

String entries don't allow surrounding quotations #7070

Fusezion opened this issue Sep 12, 2024 · 4 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@Fusezion
Copy link
Contributor

Skript/Server Version

[14:48:55 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[14:48:55 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[14:48:55 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[14:48:55 INFO]: [Skript] Server Version: 1.21.1-52-e08e667 (MC: 1.21.1)
[14:48:55 INFO]: [Skript] Skript Version: 2.9.1 (skriptlang-github)
[14:48:55 INFO]: [Skript] Installed Skript Addons:
[14:48:55 INFO]: [Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[14:48:55 INFO]: [Skript]  - skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[14:48:55 INFO]: [Skript]  - SkBee v3.6.2 (https://github.com/ShaneBeee/SkBee)
[14:48:55 INFO]: [Skript]  - SkAnimation v1.0.1 (fusezion.github.io)
[14:48:55 INFO]: [Skript] Installed dependencies:
[14:48:55 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

When using hex codes inside code areas like these

options:
    option: <#blah>
    
command /blah:
  cooldown: 1 hour
  cooldown message: <#blah>

If you don't use the doubled variant of ## they will act as a normal comment

Expected Behavior

Preferably act as a normal hex pattern if it can match hex, otherwise act as a comment

Steps to Reproduce

command /example:
  cooldown: 1 hour
  cooldown message: <#ff00ff>I failed the color check
command /example2:
  cooldown: 1 hour
  cooldown message: <##ff00ff>I passed the color check

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth
Copy link
Member

To my knowledge this is functionally impossible as, when we're determining comments, we have no knowledge of the semantics of the code. The only reason we can use single # in strings is precisely because there are " marks to tell the code what's in a string and what isn't. For entries like this, how does the code tell the difference between entry: value # more value and entry: value # comment?

The only solution here is adding "" around the entry, which should already be supported.

@Fusezion
Copy link
Contributor Author

A quick test for that ignoring the first broadcast as that was within the code to test options
image

@sovdeeth
Copy link
Member

Hmm i suppose it's not using VariableString's quoting methods properly then

@APickledWalrus
Copy link
Member

Might need fixed😬

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Sep 12, 2024
@sovdeeth sovdeeth changed the title Non doubled comments for hex codes in options and command entries String entries don't allow surrounding quotations Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants