<commit_before>﻿using FluentBootstrap.Typography;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using FluentBootstrap.Html;

namespace FluentBootstrap
{
    public static class TypographyExtensions
    {
        // Headings

        public static ComponentBuilder<TConfig, Heading> Heading1<TConfig, TComponent>(this BootstrapHelper<TConfig, TComponent> helper, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate<Heading>
        {
            return new ComponentBuilder<TConfig, Heading>(helper.Config, new Heading(helper, "h1"))
                .SetText(text);
        }

        public static ComponentBuilder<TConfig, Heading> Heading2<TConfig, TComponent>(this BootstrapHelper<TConfig, TComponent> helper, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate<Heading>
        {
            return new ComponentBuilder<TConfig, Heading>(helper.Config, new Heading(helper, "h2"))
                .SetText(text);<commit_msg>New Heading() method that allows specifying heading size as an int - closes #12<commit_after>﻿using FluentBootstrap.Typography;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using FluentBootstrap.Html;

namespace FluentBootstrap
{
    public static class TypographyExtensions
    {
        // Headings


        public static ComponentBuilder<TConfig, Heading> Heading<TConfig, TComponent>(this BootstrapHelper<TConfig, TComponent> helper, int size, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate<Heading>
        {
            if(size < 1)
            {
                size = 1;
            }
            else if(size > 6)
            {
                size = 6;
            }
            return new ComponentBuilder<TConfig, Heading>(helper.Config, new Heading(helper, "h" + size))
                .SetText(text);
        }

        public static ComponentBuilder<TConfig, Heading> Heading1<TConfig, TComponent>(this BootstrapHelper<TConfig, TComponent> helper, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate<Heading>
        {
            return new ComponentBuilder<TConfig, Heading>(helper.Config, new Heading(helper, "h1"))
                .SetText(text);
        }

        public static ComponentBuilder<TConfig, Heading> Heading2<TConfig, TComponent>(this BootstrapHelper<TConfig, TComponent> helper, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate<Heading>
        {
            return new ComponentBuilder<TConfig, Heading>(helper.Config, new Heading(helper, "h2"))
                .SetText(text);
{'fraction_non_alphanumeric': 0.08397715821296607, 'fraction_numerical': 0.0047027208599261005, 'mean_word_length': 2.7888040712468194, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '5622436', 'n_tokens_mistral': 792, 'n_tokens_neox': 767, 'n_words': 204}