jscritic icon indicating copy to clipboard operation
jscritic copied to clipboard

Add CodeMirror to highlight code

Open XhmikosR opened this issue 11 years ago • 5 comments

XhmikosR avatar Mar 30 '14 04:03 XhmikosR

For funsies, I ran Codemirror through JSCritic. Its only flaws are:

  • it does User-Agent sniffing
  • it has 8 unused variables: next, updated, updateInput, range, mX, mY, style, ok

mathiasbynens avatar Mar 30 '14 10:03 mathiasbynens

Do you know of any good alternative? I only suggested CodeMirror because I have seen it being used a lot, but anything should do the job.

XhmikosR avatar Mar 30 '14 11:03 XhmikosR

It's a good suggestion.

I'm only worried about slowdown when pasting large chunks of code. JSCritic is already slow (could use web workers big time) when doing analysis, so it could get it even worse...

kangax avatar Apr 01 '14 20:04 kangax

I don't think highlighting will slow down things a lot. But I don't have any numbers. We can try it and see how it goes maybe?

XhmikosR avatar Apr 02 '14 04:04 XhmikosR

Sure.

Sent from my iPhone

On Apr 2, 2014, at 0:38, XhmikosR [email protected] wrote:

I don't think highlighting will slow down things a lot. But I don't have any numbers. We can try it and see how it goes maybe?

— Reply to this email directly or view it on GitHub.

kangax avatar Apr 02 '14 12:04 kangax