<commit_before><?php

namespace AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

/**
 * Class PostType
 * @package AppBundle\Form
 */
class PostType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title')
            ->add(
                'summary',
                'textarea',
                array(
                    'help' => 'Short introduction.  Keep it simple and short.'
                )
            )
            ->add(
                'content',
                'textarea',
                array(
                    'attr' => array('rows' => 20),
                )
            )
            ->add(
                'file',
                'file',
                array(
                    'label' => 'Image',
                    'required' => false,
                    'preview_base_path' => 'WebPath',
                )
            )
            ->add('authorEmail', 'email')
            ->add(
                'publishedAt',
                'datetime',
                array(
                    'widget' => 'choice',
                )
            )
            ->add(
                'status',
                'checkbox',
                array(
                    'label' => 'Published',
                    'required' => false,
                )
            );
    }<commit_msg>Implement markdown editor support<commit_after><?php

namespace AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

/**
 * Class PostType
 * @package AppBundle\Form
 */
class PostType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title')
            ->add(
                'summary',
                'textarea',
                array(
                    'help' => 'Short introduction.  Keep it simple and short.'
                )
            )
            ->add(
                'content',
                'textarea',
                array(
                    'attr' => array('rows' => 20),
                    'markdown' => true,
                )
            )
            ->add(
                'file',
                'file',
                array(
                    'label' => 'Image',
                    'required' => false,
                    'preview_base_path' => 'WebPath',
                )
            )
            ->add('authorEmail', 'email')
            ->add(
                'publishedAt',
                'datetime',
                array(
                    'widget' => 'choice',
                )
            )
            ->add(
                'status',
                'checkbox',
                array(
                    'label' => 'Published',
                    'required' => false,
                )
            );
    }
{'fraction_non_alphanumeric': 0.11230110159118727, 'fraction_numerical': 0.0012239902080783353, 'mean_word_length': 1.0116923076923077, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 36, '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': '5813682', 'n_tokens_mistral': 813, 'n_tokens_neox': 757, 'n_words': 157}