- api
- since 7.5.0.0
Constants |
public
Highlight\Highlighter
::SPAN_END_TAG
=
''
|
Methods |
public __construct () |
public
disableSafeMode
()
|
public
enableSafeMode
()
|
public
getAliasesForLanguage
(
$name
) Returns list of all available aliases for given language name.
|
public
getClassPrefix
() Get the class prefix string.
|
public
getTabReplace
() Get the tab replacement string.
|
public
highlight
(
$languageName
,
$code
,
$ignoreIllegals
=
true
,
$continuation
=
NULL
) Core highlighting function. Accepts a language name, or an alias, and a
|
public
highlightAuto
(
$code
,
$languageSubset
=
NULL
) Highlight the given code by highlighting the given code with each
|
public
listLanguages
(
$include_aliases
=
false
) Return a list of all supported languages. Using this list in
|
public
static
registerLanguage
(
$languageId
,
$filePath
,
$overwrite
=
false
) Register a language definition with the Highlighter's internal language
|
public
setAutodetectLanguages
(
array
$set
) Set the set of languages used for autodetection. When using
|
public
setClassPrefix
(
$classPrefix
) Set the class prefix string.
|
public
setTabReplace
(
$tabReplace
) Set the tab replacement string. This defaults to NULL: no tabs
|
Properties |
private
static
$aliases
|
private
static
$classMap
|
private
$codeToHighlight
|
private
$continuations
|
private
$ignoreIllegals
|
private
$language
|
private
static
$languages
|
private $lastMatch |
private
$modeBuffer
|
private
$options
|
private
$relevance
|
private
$result
|
private
$safeMode
|
private
$top
|
Methods |
private
autoDetection
(
$name
) Determine whether or not a language definition supports auto detection.
|
private
buildSpan
(
$className
,
$insideSpan
,
$leaveOpen
=
false
,
$noPrefix
=
false
)
|
private
doBeginMatch
(
$match
)
|
private
doEndMatch
(
$match
)
|
private
endOfMode
(
$mode
,
$lexeme
)
|
private
escape
(
$value
)
|
private
escapeRe
(
$value
)
|
private
getLanguage
(
$name
)
|
private
keywordMatch
(
$mode
,
$match
)
|
private
processBuffer
()
|
private
processKeywords
()
|
private
processLexeme
(
$textBeforeMatch
,
$match
=
NULL
)
|
private
processSubLanguage
()
|
private
static
registerLanguages
() Loop through all of the languages in our
|
private
replaceTabs
(
$code
) Replace tabs for something more usable.
|
private
startNewMode
(
$mode
)
|
private
testRe
(
$re
,
$lexeme
)
|
Properties |
private
static
$aliases
|
private
static
$classMap
|
private
static
$languages
|
Methods |
public
static
registerLanguage
(
$languageId
,
$filePath
,
$overwrite
=
false
) Register a language definition with the Highlighter's internal language
|
private
static
registerLanguages
() Loop through all of the languages in our
|