struct Amber::Markdown::Rule::CodeBlock

Included Modules

Defined in:

amber/markdown/rules/code_block.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Amber::Markdown::Rule

accepts_lines? : Bool accepts_lines?, continue(parser : Parser, container : Node) : ContinueStatus continue, match(parser : Parser, container : Node) : MatchValue match, token(parser : Parser, container : Node) : Nil token

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.closing_fence_length(text : String) : Int32 | Nil #

Returns the length of the closing code fence that starts text, or nil: three or more backticks or tildes followed only by spaces, up to the end of the text or a final newline.


[View source]
def self.opening_fence_length(text : String) : Int32 | Nil #

Returns the length of the opening code fence that starts text, or nil: three or more backticks with no backtick after them on the line, or three or more tildes.


[View source]

Instance Method Detail

def accepts_lines? : Bool #
Description copied from module Amber::Markdown::Rule

accepts_line


[View source]
def can_contain?(type) #

[View source]
def continue(parser : Parser, container : Node) : ContinueStatus #
Description copied from module Amber::Markdown::Rule

continue


[View source]
def initialize #

[View source]
def match(parser : Parser, container : Node) : MatchValue #
Description copied from module Amber::Markdown::Rule

match and parse


[View source]
def token(parser : Parser, container : Node) : Nil #
Description copied from module Amber::Markdown::Rule

token finalize


[View source]