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

sh syntax is not recognized by prism.js #1246

Closed
vadosnaprimer opened this issue Apr 22, 2022 · 7 comments · Fixed by #1380
Closed

sh syntax is not recognized by prism.js #1246

vadosnaprimer opened this issue Apr 22, 2022 · 7 comments · Fixed by #1380

Comments

@vadosnaprimer
Copy link
Collaborator

https://tasvideos.org/Forum/Posts/508418

The download button is there, but syntax is not highlighted, because prism expects bash instead of sh. So if we work around it by editing old code samples with download functionality, they will become file.bash which may not be desired.

@Masterjun3
Copy link
Collaborator

You probably want shell then.
While prism does just alias it to bash it's still closer to sh.
Of course the download would then be file.shell. If that's still undesirable we might need to look into custom prism aliases for these kinds of changes.

@vadosnaprimer
Copy link
Collaborator Author

Maybe they will merge a PR just like they did for avisynth PrismJS/prism#3071

@nattthebear
Copy link
Collaborator

Our forum syntax expects the file extension to be the same as the prism alias. Are there other situations where this is not the case?

@vadosnaprimer
Copy link
Collaborator Author

vadosnaprimer commented Apr 22, 2022

Theoretically .py but it's nontrivial to find where it was used with the download option. For example I only found one without it https://tasvideos.org/Forum/Posts/475041
Disregard that, .py works just fine!

@vadosnaprimer
Copy link
Collaborator Author

vadosnaprimer commented May 10, 2022

Tho .bat doesn't https://tasvideos.org/Forum/Posts/514245 (needs to be .batch to work but then it's not an extension known to the system).

@vadosnaprimer
Copy link
Collaborator Author

c++ has to be cpp to work.

@nattthebear
Copy link
Collaborator

Looks like we need a mapping layer then, to go back and forth between prism aliases and file extensions.

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

Successfully merging a pull request may close this issue.

4 participants