JUSH Documentation

Parser states = allowed languages

Each state can be used as the language in <code class="jush-state"> or jush.highlight(state, text). The highlighted code is wrapped in <span class="jush-state">, which can be styled by CSS. The first state of each group is the language itself.

htmHTML code
htm_comHTML comment
entHTML entity
tagInside tag
tag_cssInside style tag
tag_jsInside script tag
attBefore = of tag's attribute
att_cssAfter = of style attribute
att_jsAfter = of on* attribute
att_httpAfter = of http-equiv attribute
att_quoInside quoted attribute value
att_apoInside apostrophed attribute value
att_valInside non-quoted attribute value
 
xmlXML code
xml_tagInside XML tag
xml_attXML attribute
 
cssCSS code
css_atAfter CSS at-rule
css_at2Inside {} of at-rule
css_proProperty - inside {} of selector
css_valAfter : following property
css_jsInside CSS expression
clrColor after #
 
quoInside quotes
apoInside apostrophes
comInside /* */ comment
com_nestInside nestable /* */ comment
oneOne-line comment
escAfter \
numNumber
 
jsJavaScript code, also inside {} and ${}
js_codeJavaScript statement
js_oneOne-line comment
js_docJSDoc /** */ comment
js_regRegular expression
js_reg_braInside [] of regular expression
js_bacTemplate literal (inside backticks)
js_objObject literal
js_keyKey in object literal
js_valValue in object literal
js_arrArray literal
js_writeAfter write( or writeln(
js_write_codeArguments of write() - strings are HTML
js_httpAfter .setRequestHeader( or .getResponseHeader(
js_http_codeArguments of setRequestHeader() - strings are HTTP headers
 
jsonJSON
json_objObject
json_keyKey in object
json_valValue in object
json_arrArray
 
phpPHP code (after <?php tag)
php2PHP code (after optional = of <?=)
php_echoCode after echo, print or <?= - strings are in the surrounding language
php_phpCode inside eval() or functions with callback parameter
php_sqlCode inside mysql_query(), mysqli_query() and similar
php_sqliteCode inside sqlite_query() and similar
php_pgsqlCode inside pg_query() and similar
php_mssqlCode inside sqlsrv_query() and similar
php_oracleCode inside oci_parse()
php_phpiniCode inside ini_set() or ini_get()
php_httpCode inside header()
php_mailCode inside mail()
php_newClass name after new, instanceof, extends, class, implements or interface
php_metClass name before ::
php_funName after function, -> or ::
php_varVariable (after $)
php_quo_var{$} or ${} variable inside string
php_quoInside quotes
php_apoInside apostrophes
php_bacInside backticks
php_eotBeginning of heredoc or nowdoc (after <<<)
php_eot2Inside heredoc or nowdoc
php_onePHP one-line comment
php_docPHPDoc /** */ comment
php_comInside /* */ comment
php_haltAfter __halt_compiler()
php_halt2Anything after ; or ?> following __halt_compiler()
 
phpiniphp.ini
 
cnfApache configuration
quo_oneInside quotes ending at the end of line
cnf_httpAfter Header, RequestHeader or CacheIgnoreHeaders
cnf_phpAfter PHPIniDir
cnf_phpiniAfter php_value, php_flag, php_admin_value or php_admin_flag
cnf_phpini_valValue of php.ini directive
 
httpHTTP headers
mailE-mail headers
 
sqlMySQL and MariaDB code
sql_codeStatement other than SET
sql_sqlsetAfter SET
sqlset_valValue after = of SET
sqlsetSystem variable
sqlstatusStatus variable
com_codeBeginning or end of executable /*! */ comment
sql_apoInside SQL apostrophes
sql_quoInside SQL quotes
sql_varInside SQL variable
bacInside backticks
 
sqliteSQLite
sqlite_sqlitesetAfter PRAGMA
sqlitesetPragma
sqlitestatusCompile-time option
sqlite_apoInside SQL apostrophes without backslash escapes
sqlite_quoInside SQL quotes without backslash escapes
braInside square brackets
 
pgsqlPostgreSQL
pgsql_codeStatement other than SET, SHOW and CREATE EXTENSION
pgsql_pgsqlsetAfter SET or SHOW
pgsqlsetConfiguration parameter
pgsql_pgsqlextAfter CREATE, ALTER or DROP EXTENSION
pgsqlextExtension name
pgsql_eotBeginning of dollar-quoted string (after $)
pgsql_eot2Inside dollar-quoted string or function body
 
mssqlMS SQL
mssql_braInside square brackets
 
oracleOracle
clickhouseClickHouse
firebirdFirebird
simpledbSimpleDB
 
redisRedis commands
elasticElasticsearch queries (path: JSON)
igdbIGDB API queries
 
txtPlain text

JUSH Homepage