Code
class Code(val content: String, val language: String?, val showLineNumbers: Boolean = true, val focusedLines: Range? = null, val caption: String? = null, val referenceId: String? = null) : LocationTrackableNode, CrossReferenceableNode, CaptionableNode, LocalizedKind
A code block.
Parameters
content
code content
language
optional syntax language
showLineNumbers
whether to show line numbers
focusedLines
range of lines to focus on. No lines are focused if null
caption
optional caption
referenceId
optional ID for cross-referencing via a com.quarkdown.core.ast.quarkdown.reference.CrossReference
Constructors
Properties
Link copied to clipboard
Whether this node should be tracked in the document's hierarchy.
Link copied to clipboard
Link copied to clipboard
Key for localization of the kind of this node, used to look up localized strings in the default com.quarkdown.core.localization.LocalizationTable.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
fun LocationTrackableNode.formatLocation(context: Context, format: (DocumentNumbering) -> NumberingFormat?): String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Retrieves the stored media associated with this node, if any.
Link copied to clipboard
Registers the location of this node within the document handled by context.
Link copied to clipboard
Registers the formatted location of this node within the document handled by context, according to this node's NumberingFormat.
Link copied to clipboard