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 suggestion: syntax highlighting #145

Open
airone506 opened this issue May 4, 2023 · 4 comments
Open

Feature suggestion: syntax highlighting #145

airone506 opened this issue May 4, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed python

Comments

@airone506
Copy link

Hello, first of all I would like to thank you for such a useful software and running the great bpa.st.

Now I would like to politely suggest a feature. Please make it possible to enable/change the syntax highlighting also in View paste mode.

@supakeen
Copy link
Owner

Do you mean selecting a different lexer, or to disable it?

@airone506
Copy link
Author

I mean to enable any lexer for the existing paste(s). It happens quite often that uploader forgets to select the lexer and this affects the readability of the code for those who are viewing it. Current workaround is to re-paste the code with the correct lexer enabled or copy-paste to your desktop editor, but one click (or two clicks literally) on the "view paste" webpage would be more convenient. This is more like the UX enhancement.

@supakeen
Copy link
Owner

supakeen commented Jun 5, 2023

While I do like the idea the issue is mostly that we save the syntax highlighted output directly into the database to prevent having to re-syntax every time a paste is viewed.

Currently you can indeed directly repaste the paste with the repaste button and then change the syntax. I'll leave it open because if more people find this important I'm willing to add something to handle this.

@supakeen supakeen added enhancement New feature or request help wanted Extra attention is needed python labels Jun 5, 2023
@airone506
Copy link
Author

A possible solution would be to change the current default Text only highlighter to a blank one with some descriptive placeholder text. See the attached mock-up.

upl-bpast1

The dropdown has a bright color to attract the user's attention. The Paste! button is disabled with dimmed color and re-styled cursor. With the button disabled, the user will not be able to submit the paste. As soon as any syntax highlight is selected by the user, the drop-down changes color to the default one and the properties of the submit button change to: default color, enabled, default cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed python
Projects
None yet
Development

No branches or pull requests

2 participants