<commit_before>package markdown

import (
	"fmt"

	g "github.com/SimonRichardson/butler/generic"
)

type headerType string

var (
	H1 headerType = "#"
	H2 headerType = "##"
	H3 headerType = "###"
	H4 headerType = "####"
	H5 headerType = "#####"
	H6 headerType = "######"
)

func (h headerType) IsInline() bool {
	return false
}

func (h headerType) Children() g.Option {
	return g.Option_.Empty()
}

func (h headerType) String() string {
	return string(h)
}

type header struct {
	Type  headerType
	Value marks
}

func (h header) IsInline() bool {
	return false
}

func (h header) Children() g.Option {
	return g.Option_.Of(g.List_.Of(h.Value))
}

func (h header) String() string {
	return fmt.Sprintf("%s", h.Type.String())
}

func h1(val marks) header {
	return header{
		Type:  H1,
		Value: val,
	}
}

func h2(val marks) header {
	return header{
		Type:  H2,
		Value: val,
	}
}

func h3(val marks) header {
	return header{
		Type:  H3,
		Value: val,
	}
}

func h4(val marks) header {
	return header{
		Type:  H4,
		Value: val,
	}
}

func h5(val marks) header {
	return header{
		Type:  H5,
		Value: val,
	}
}

func h6(val marks) header {
	return header{
		Type:  H6,
		Value: val,
	}
}<commit_msg>Starting to write headers correctly<commit_after>package markdown

import (
	"fmt"

	g "github.com/SimonRichardson/butler/generic"
)

type headerType string

var (
	H1 headerType = "#"
	H2 headerType = "##"
	H3 headerType = "###"
	H4 headerType = "####"
	H5 headerType = "#####"
	H6 headerType = "######"
)

func (h headerType) IsInline() bool {
	return true
}

func (h headerType) Children() g.Option {
	return g.Option_.Empty()
}

func (h headerType) String() string {
	return fmt.Sprintf("%s ", string(h))
}

type header struct {
	nodes g.List
}

func (h header) IsInline() bool {
	return false
}

func (h header) Children() g.Option {
	return g.Option_.Of(h.nodes)
}

func (h header) String() string {
	return ""
}

func h1(val marks) header {
	return header{
		nodes: fromMarks(append([]marks{H1}, val)),
	}
}

func h2(val marks) header {
	return header{
		nodes: fromMarks(append([]marks{H2}, val)),
	}
}

func h3(val marks) header {
	return header{
		nodes: fromMarks(append([]marks{H3}, val)),
	}
}

func h4(val marks) header {
	return header{
		nodes: fromMarks(append([]marks{H4}, val)),
	}
}

func h5(val marks) header {
	return header{
		nodes: fromMarks(append([]marks{H5}, val)),
	}
}

func h6(val marks) header {
	return header{
		nodes: fromMarks(append([]marks{H6}, val)),
	}
}
{'fraction_non_alphanumeric': 0.15918203688853247, 'fraction_numerical': 0.014434643143544507, 'mean_word_length': 3.8259187620889747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6686614', 'n_tokens_mistral': 1003, 'n_tokens_neox': 976, 'n_words': 259}