LiteralTextRole
extends BaseTextRole
in package
FinalYes
Role to create a literal block.
A literal block is a block of text that is displayed as-is, without any formatting.
Example:
:literal:`code`
Table of Contents
Properties
Methods
- getAliases() : array<string|int, string>
- getClass() : string
- getName() : string
- processNode() : GenericTextRoleInlineNode
- setClass() : void
- withName() : BaseTextRole
Properties
$class
protected
string
$class
= ''
$name
protected
string
$name
= 'literal'
Methods
getAliases()
public
getAliases() : array<string|int, string>
Return values
array<string|int, string>getClass()
public
getClass() : string
Return values
stringgetName()
public
getName() : string
Return values
stringprocessNode()
public
processNode(DocumentParserContext $documentParserContext, string $role, string $content, string $rawContent) : GenericTextRoleInlineNode
Parameters
- $documentParserContext : DocumentParserContext
- $role : string
- $content : string
-
the content with backslash escapes removed per spec
- $rawContent : string
-
the raw content, including backslash escapes
Return values
GenericTextRoleInlineNodesetClass()
public
setClass(string $class) : void
Parameters
- $class : string
withName()
public
withName(string $name) : BaseTextRole
Parameters
- $name : string