Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vrana/jush
JavaScript Syntax Highlighter
https://github.com/vrana/jush
syntax-highlighting
Last synced: about 1 month ago
JSON representation
JavaScript Syntax Highlighter
- Host: GitHub
- URL: https://github.com/vrana/jush
- Owner: vrana
- Created: 2010-04-25T21:26:30.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T15:22:55.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T12:20:33.579Z (about 2 months ago)
- Topics: syntax-highlighting
- Language: JavaScript
- Homepage: http://jush.sourceforge.net/
- Size: 789 KB
- Stars: 25
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: readme.html
- Changelog: changes.txt
Awesome Lists containing this project
README
JUSH - JavaScript Syntax Highlighter
JUSH - JavaScript Syntax Highlighter
Highlights the full stack of PHP application starting with HTML, PHP, SQL and JavaScript code and ending with HTTP headers,
php.ini
settings or database variables.
Features
- Highlights and links documentation in spaghetti code like nothing else:
<span style="font: small;"><?php mysql_query("SELECT 1"); ?></span>
. - Supported languages: everything related to PHP: HTML5, JS, CSS 3, SQL including variables (multiple dialects),
php.ini
directives, HTTP and e-mail headers, Apache config. Anything could be embedded into each other, e.g.header("Content-Type: text/html")
orcolor: expression(parentNode.style.color)
. - Allows using HTML tags in source code (could be used for pointing out important parts):
echo "This part is important."
. Produces overlapping HTML tags in this case though. - Performance is a priority.
-
<textarea>
syntax highlight.
Installation instructions
- Copy jush.css and jush.js into your directory.
- Add following snippet before the
</body>
tag in HTML file:<script type="text/javascript" src="jush.js"></script>
<script type="text/javascript">
jush.style('jush.css');
jush.highlight_tag('code');
</script>
All<code class="jush">
tags will be highlighted. Language is determined by the class name beginning with "jush-" (e.g.<code class="jush-js">
). Default language ishtm
. It is also possible to use<code class="language-*">
.
Alternativelly call jush.highlight(language, text)
to syntax highlight single text.
Command-line help reference
It is also possible to use JUSH for opening the appropriate documentation in a browser. On Windows, it is possible to run:
Syntax: WScript jush-help.wsf filename line column [tabsize] [word]
Example: WScript jush-help.wsf readme.html 2 2
The example should open a browser with documentation of the <html>
tag which is at position 2:2 of this file.
jush.style('jush.css');
jush.highlight_tag('code');