func TestHasNoFrontmatter(t *testing.T) {

	// stub our cheatsheet content
	markdown := "To foo the bar: baz"

	// parse the frontmatter
	text, fm, err := Parse(markdown)

	// assert expectations
	if err != nil {
		t.Errorf("failed to parse markdown: %v", err)
	}

	if text != markdown {
		t.Errorf("failed to parse text: want: %s, got: %s", markdown, text)
	}

	if fm.Syntax != "" {
		t.Errorf("failed to parse syntax: want: '', got: %s", fm.Syntax)
	}

	if len(fm.Tags) != 0 {
		t.Errorf("failed to parse tags: want: len 0, got: len %d", len(fm.Tags))
	}
}
// TestHasFrontmatter asserts that markdown is properly parsed when it does not
// contain frontmatter
TestHasFrontmatter asserts that markdown is properly parsed when it does not
contain frontmatter
// TestHasFrontmatter asserts that markdown is properly parsed when it does not // contain frontmatter
func TestHasNoFrontmatter(t *testing.T) {
	markdown := "To foo the bar: baz"
	text, fm, err := Parse(markdown)
	if err != nil {
		t.Errorf("failed to parse markdown: %v", err)
	}
	if text != markdown {
		t.Errorf("failed to parse text: want: %s, got: %s", markdown, text)
	}
	if fm.Syntax != "" {
		t.Errorf("failed to parse syntax: want: '', got: %s", fm.Syntax)
	}
	if len(fm.Tags) != 0 {
		t.Errorf("failed to parse tags: want: len 0, got: len %d", len(fm.Tags))
	}
}
func TestHasNoFrontmatter ( t * testing . T ) { markdown := " " text , fm , err := Parse ( markdown ) if err != nil { t . Errorf ( " " , err ) } if text != markdown { t . Errorf ( " " , markdown , text ) } if fm . Syntax != " " { t . Errorf ( " " , fm . Syntax ) } if len ( fm . Tags ) != 0 { t . Errorf ( " " , len ( fm . Tags ) ) } }
TestHasFrontmatter asserts that markdown is properly parsed when it does not
contain frontmatter
TestHasFrontmatter asserts that markdown is properly parsed when it does not contain frontmatter
// stub our cheatsheet content // parse the frontmatter // assert expectations