class Savi::SpecMarkdown

Defined in:

savi/spec_markdown.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(path : String) #

[View source]

Class Method Detail

def self.get_code_pos(source : Source, code_block : String) #

[View source]
def self.get_example_pos(source : Source, example : Example) #

[View source]

Instance Method Detail

def compiled_content #

[View source]
def examples #

[View source]
def filename : String #

[View source]
def front_matter #

[View source]
def front_matter_and_main_body : Tuple(String, String) #

[View source]
def main_body #

[View source]
def segments_groups #

Take the main body of the document and split it into segment groups, where segment groups correspond to examples and are split by --- lines, where each segment is a tuple where the first element is the kind and the second element is the content of the segment. Markdown code blocks give their syntax line as the "kind", while bare text in between those code blocks has a "kind" of nil.


[View source]
def source #

[View source]
def source_package : Source::Package #

[View source]
def sources #

[View source]
def target_pass #

[View source]
def target_pass_string : String #

[View source]
def verify!(ctx : Compiler::Context) : Bool #

Verify that the final state of the given compilation matches expectations, printing info returning true on success, otherwise returning false.


[View source]
def verify_annotations!(ctx : Compiler::Context) : Bool #

[View source]
def verify_errors!(ctx : Compiler::Context) : Bool #

[View source]
def verify_other_blocks!(ctx : Compiler::Context) : Bool #

[View source]