<commit_before><template>
    <section class="container margin-top-5 col-7 user-select" id="new-submission">
        <moon-loader :loading="loading" :size="'40px'" :color="'#38634f'" class="form-loader"></moon-loader>

        <div :class="loading ? 'opacity-fade' : ''">
            <h1 class="align-center">
                New Submission
            </h1>

            <div class="v-status v-status--error" v-if="customError">
                {{ customError }}
            </div>

            <form action="/submit" method="post">
                <div class="form-group relative">
                    <input type="text" class="form-control v-input-big" v-bind:class="{ 'btn-input-text': submissionType == 'link'}"
                    id="title" name="title" placeholder="Title ..." autocomplete="off" v-model="fTitle" :disabled="loading">

                    <button type="button" class="v-button v-button--primary btn-input" @click="getTitle(submitURL)"
                    v-if="submissionType == 'link' && submitURL && !loadingTitle"
                            data-toggle="tooltip" data-placement="bottom" title="Fetch title from entered URL" :disabled="loading"
                    >Suggest</button>

                    <moon-loader :loading="loadingTitle" :size="'30px'" :color="'#777'" class="btn-input"></moon-loader>

                    <small class="text-muted go-red" v-for="e in errors.title">{{ e }}</small>
                </div>

                <input type="hidden" name="type" v-bind:value="submissionType">

                <div v-show="submissionType == 'text'">
                    <textarea class="form-control v-input-big" rows="3" id="text" name="text" placeholder="Text(optional)..."
                    v-model="fText" :disabled="loading"></textarea>

                    <div class="flex-space">
                        <a class="comment-form-guide text-muted" @click="$eventHub.$emit('markdown-guide')">
        	            	Formatting Guide
        	            </a>

                        <a class="comment-form-guide text-muted" @click="preview = !preview" v-show="fText">
        	            	Preview
        	            </a>
                    </div>


                    <small class="text-muted go-red" v-for="e in errors.text">{{ e }}</small>
                </div>

                <div v-if="preview && fText" class="form-wrapper">
                    <markdown :text="fText"></markdown><commit_msg>fix margin-bottom for preview div<commit_after><template>
    <section class="container margin-top-5 col-7 user-select" id="new-submission">
        <moon-loader :loading="loading" :size="'40px'" :color="'#38634f'" class="form-loader"></moon-loader>

        <div :class="loading ? 'opacity-fade' : ''">
            <h1 class="align-center">
                New Submission
            </h1>

            <div class="v-status v-status--error" v-if="customError">
                {{ customError }}
            </div>

            <form action="/submit" method="post">
                <div class="form-group relative">
                    <input type="text" class="form-control v-input-big" v-bind:class="{ 'btn-input-text': submissionType == 'link'}"
                    id="title" name="title" placeholder="Title ..." autocomplete="off" v-model="fTitle" :disabled="loading">

                    <button type="button" class="v-button v-button--primary btn-input" @click="getTitle(submitURL)"
                    v-if="submissionType == 'link' && submitURL && !loadingTitle"
                            data-toggle="tooltip" data-placement="bottom" title="Fetch title from entered URL" :disabled="loading"
                    >Suggest</button>

                    <moon-loader :loading="loadingTitle" :size="'30px'" :color="'#777'" class="btn-input"></moon-loader>

                    <small class="text-muted go-red" v-for="e in errors.title">{{ e }}</small>
                </div>

                <input type="hidden" name="type" v-bind:value="submissionType">

                <div v-show="submissionType == 'text'">
                    <textarea class="form-control v-input-big" rows="3" id="text" name="text" placeholder="Text(optional)..."
                    v-model="fText" :disabled="loading"></textarea>

                    <div class="flex-space">
                        <a class="comment-form-guide text-muted" @click="$eventHub.$emit('markdown-guide')">
        	            	Formatting Guide
        	            </a>

                        <a class="comment-form-guide text-muted" @click="preview = !preview" v-show="fText">
        	            	Preview
        	            </a>
                    </div>


                    <small class="text-muted go-red" v-for="e in errors.text">{{ e }}</small>
                </div>

                <div v-if="preview && fText" class="form-wrapper margin-bottom-1">
                    <markdown :text="fText"></markdown>
{'fraction_non_alphanumeric': 0.16592382495948135, 'fraction_numerical': 0.007090761750405186, 'mean_word_length': 1.8422567645365573, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, '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': '5312976', 'n_tokens_mistral': 1437, 'n_tokens_neox': 1314, 'n_words': 260}