<commit_before>@function str-replace($string, $search, $replace: '') {
    $index: str-index($string, $search);

    @if $index {
        @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
    }

    @return $string;
}

@function admin-font-faces($fonts) {
    $url: "https://fonts.googleapis.com/css?family=";
    $nb: 0;

    @each $fontname, $weights in $fonts {

        @if $fontname == $fonts-default or
            $fontname == $fonts-header or
            $fontname == $fonts-mono {

            $nb: $nb + 1;
            $nb-word: 0;

            $fontname: str-replace("#{$fontname}", " ", "+");

            $url: $url + $fontname;

            @if $weights != null {
                $url: $url + ":" + $weights;
            }

            @if $nb < 3 {
                $url: $url + "|";
            }
        }
    }

    @return $url;
}

@mixin body-fonts($font) {
    body, h5, h6,
    .badge, .note, .grav-mdeditor-preview,
    input, select, textarea, button, .selectize-input {
        font-family: "#{$font}", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    }
}

@mixin header-fonts($font) {
    h1, h2, h3, h4,
    #admin-menu li, .form-tabs > label, .label {
        font-family: "#{$font}", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    }
}

@mixin mono-fonts($font) {
    code, kbd, pre, samp,
    body .CodeMirror {
        font-family: "#{$font}", "Monaco", "Consolas", "Lucida Console", monospace !important;
    }
}
$font-url: admin-font-faces($font-definitions);

@import url("#{$font-url}");

@include body-fonts($fonts-default);<commit_msg>Added support for Latin Extended fonts (#1221)<commit_after>@function str-replace($string, $search, $replace: '') {
    $index: str-index($string, $search);

    @if $index {
        @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
    }

    @return $string;
}

@function admin-font-faces($fonts) {
    $url: "https://fonts.googleapis.com/css?family=";
    $nb: 0;

    @each $fontname, $weights in $fonts {

        @if $fontname == $fonts-default or
            $fontname == $fonts-header or
            $fontname == $fonts-mono {

            $nb: $nb + 1;
            $nb-word: 0;

            $fontname: str-replace("#{$fontname}", " ", "+");

            $url: $url + $fontname;

            @if $weights != null {
                $url: $url + ":" + $weights;
            }

            @if $nb < 3 {
                $url: $url + "|";
            }
        }
    }

    @return $url + "&subset=latin-ext";
}

@mixin body-fonts($font) {
    body, h5, h6,
    .badge, .note, .grav-mdeditor-preview,
    input, select, textarea, button, .selectize-input {
        font-family: "#{$font}", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    }
}

@mixin header-fonts($font) {
    h1, h2, h3, h4,
    #admin-menu li, .form-tabs > label, .label {
        font-family: "#{$font}", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    }
}

@mixin mono-fonts($font) {
    code, kbd, pre, samp,
    body .CodeMirror {
        font-family: "#{$font}", "Monaco", "Consolas", "Lucida Console", monospace !important;
    }
}
$font-url: admin-font-faces($font-definitions);

@import url("#{$font-url}");

@include body-fonts($fonts-default);
{'fraction_non_alphanumeric': 0.19859196245233207, 'fraction_numerical': 0.008213552361396304, 'mean_word_length': 2.3171206225680936, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4933804', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1183, 'n_words': 256}