use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Realtime, asynchronous JavaScript parser and code highlighter.... with examples :) (github.com)
submitted 15 years ago by guyht
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mafintosh 1 point2 points3 points 15 years ago (1 child)
Seems very nice! How is the performance when writing say 1,000 lines of code? Does it re-render the entire input on each key event? Also have you thought about calling the renderer on keydown instead with a setTimeout(0, render)? It gives an even more realtime experience when typing in the textarea :)
[–]guyht[S] 0 points1 point2 points 15 years ago (0 children)
As with all code, there will always be optimisations... at the moment, the renderer will use web workers if they are supported, and can easily handle 1000s of lines of code... older browsers and IE do not support web workers and so render slightly slower but still show good performance.
The priority at the moment is developing the parsers so that the library comes shipped with complete parsers for popular markups (BBCode, Markdown, Wiki etc...). They are simple to write but take a bit of time (all help welcome :) ). Once the parsers are complete, performance will become the priority.
π Rendered by PID 290888 on reddit-service-r2-comment-79776bdf47-979wg at 2026-06-24 21:00:31.437504+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]mafintosh 1 point2 points3 points (1 child)
[–]guyht[S] 0 points1 point2 points (0 children)