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

Add syntax highlighting #395

Open
dwitterer opened this issue Sep 14, 2018 · 4 comments
Open

Add syntax highlighting #395

dwitterer opened this issue Sep 14, 2018 · 4 comments

Comments

@dwitterer
Copy link
Contributor

This was previously discussed in #247, but it seems that noone has actually gotten round to implementing this. Therefore, I opened a seperate issue for this, well... issue, as per @lionleaf's request (and common sense).

The basic gist:

  • The highlighting should be done client-side for performance (obviously :/)
  • We can use libraries like highlight.js and syntax.js, so we don't even need to write anything special

Easy stuff to do - we just need to source highlight.js and use it on code blocks, updating on every newCode, but we kinda abandoned the idea, so... here we are again.

@dwitterer
Copy link
Contributor Author

dwitterer commented Sep 14, 2018

If anyone does feel like doing something more, however, then a bracket matcher would also be great. This would basically just check if the character behind the caret is a ( or ) and look back for the previous/next matching bracket accordingly. In Atom, for example, it looks like this (you might have to enlarge the image quite a lot - github compression screwed up the image quite badly):

screenshot from 2018-09-14 21-12-28

@imscary
Copy link
Contributor

imscary commented Sep 15, 2018

I was going to create this issue too! Syntax Highlighting will make that text area look awesome. Highlight.js is the best here in my opinion.

@joeytwiddle
Copy link
Collaborator

#99 also had some suggestions:

@MostlyEmre
Copy link

Syntax highlighting seems to be added in beta.dwitter.net

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

No branches or pull requests

4 participants