class Luce::SimpleDelimiter

Overview

A simple delimiter implementing the Delimiter interface with basic fields, and does not have the concept of "left-flanking" or "right-flanking"

Defined in:

luce/inline_parser.cr

Constructors

Instance Method Summary

Instance methods inherited from class Luce::Delimiter

active=(active : Bool) : Nil active=, active? : Bool active?, char : Int32 char, closable? : Bool closable?, node : Text node, node=(node : Text) node=, openable? : Bool openable?, size : Int32 size, syntax : TagSyntax syntax

Constructor Detail

def self.new(node : Luce::Text, char : Int32, size : Int32, openable : Bool, closable : Bool, syntax : Luce::TagSyntax, end_pos : Int32) #

Instance Method Detail

def active=(active : Bool) : Nil #
Description copied from class Luce::Delimiter

Whether the delimiter is active

Links cannot be nested, so we must "deactivate" any pending ones. For example, take the following text:

Text [link and [more](links)](links).

Once we have parsed Text [, there is one (pending) link in the state stack. It is, by default, active. Once we parse the next possible link, [more](links), as a real link, we must deactivate the pending links (just the one, in this case).


def active? : Bool #
Description copied from class Luce::Delimiter

Whether the delimiter is active

Links cannot be nested, so we must "deactivate" any pending ones. For example, take the following text:

Text [link and [more](links)](links).

Once we have parsed Text [, there is one (pending) link in the state stack. It is, by default, active. Once we parse the next possible link, [more](links), as a real link, we must deactivate the pending links (just the one, in this case).


def char : Int32 #
Description copied from class Luce::Delimiter

The type of delimiter

For the two-character image delimiter, ![, this is !.


def closable? : Bool #
Description copied from class Luce::Delimiter

Whether this delimiter can close emphasis or strong emphasis.


def end_pos : Int32 #

def node : Text #
Description copied from class Luce::Delimiter

The Text ndoe representing the plain text representing this delimiter


def node=(node : Text) #
Description copied from class Luce::Delimiter

The Text ndoe representing the plain text representing this delimiter


def openable? : Bool #
Description copied from class Luce::Delimiter

Whether this delimiter can open emphasis or strong emphasis.


def size : Int32 #
Description copied from class Luce::Delimiter

The number of delimiters


def syntax : TagSyntax #
Description copied from class Luce::Delimiter

The syntax which uses this delimiter to parse a tag.