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

Link copied to clipboard
constructor(content: String, language: String?, showLineNumbers: Boolean = true, focusedLines: Range? = null, caption: String? = null, referenceId: String? = null)

Properties

Link copied to clipboard

Whether this node should be tracked in the document's hierarchy.

Link copied to clipboard
open override val caption: String? = null
Link copied to clipboard
Link copied to clipboard
val focusedLines: Range? = null
Link copied to clipboard
open override val kindLocalizationKey: String

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
open override val referenceId: String? = null
Link copied to clipboard

Functions

Link copied to clipboard
open override fun <T> accept(visitor: NodeVisitor<T>): T

Accepts a visitor.

Link copied to clipboard
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