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

Apply syntax highlighters to script/stylesheet tagged passages #1573

Open
2 of 3 tasks
david-donachie opened this issue Nov 29, 2024 · 1 comment
Open
2 of 3 tasks
Labels
enhancement New feature or request P3 (could) Annoying bugs that have workarounds, Interesting ideas

Comments

@david-donachie
Copy link

Is your feature request related to a problem? Please describe.

In some formats passages with a script or stylesheet tag are significant (being treated as additional javascript or css blocks). The same is true in some compilers, such as tweego.

However in Twine these passages do not get syntax highlighting with the built in CSS and JS highlighters, and it would be great if they did.

Describe the solution you'd like.

Always apply the built-in CSS highlighter to stylesheet tagged passages and the built-in JS highlighter to script tagged passages.

Describe alternatives you've considered.

Allow the Story Format to specify whether such passages are special or not with an editor extension. This would be useful where these passages are always special (i.e. where this is dependant on the format), but no use when a story is moved from a compiler that treats them as special into Twine (which does not).

Additional context on this suggestion.

No response

Presubmission checklist

  • I am interested in working on code that would implement this feature request. (This is not required to submit a suggestion.)
  • I have done a search and believe that an issue does not already exist for this idea in the GitHub repository.
  • I have read and agree to abide by this project's Code of Conduct.
@david-donachie david-donachie added the enhancement New feature or request label Nov 29, 2024
@klembot
Copy link
Owner

klembot commented Dec 8, 2024

I actually like your alternative more :) I'd rather empower story formats to make whatever decisions they like on this.

@klembot klembot added the P3 (could) Annoying bugs that have workarounds, Interesting ideas label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 (could) Annoying bugs that have workarounds, Interesting ideas
Projects
None yet
Development

No branches or pull requests

2 participants