<commit_before>import $ from 'jquery'
import SimpleMDE from 'simplemde'
import 'simplemde/debug/simplemde.css'
import marked from 'marked'
import showdown from '../showdown'
import './style.scss'

const renderMarkdown = showdown.renderMarkdown

$(document).on('content:loaded', function(event) {
  $(event.target).find('.markdown-field').each(function() {
    new SimpleMDE({
      element: this,
      status: false,
      previewRender: function(plainText, preview) {
        setTimeout(function() {
            preview.innerHTML = renderMarkdown(plainText, {})
        }, 250)
        return "Loading..."
      }
    })
  })
})<commit_msg>Fix markdown preview<commit_after>import $ from 'jquery'
import SimpleMDE from 'simplemde'
import 'simplemde/debug/simplemde.css'
import marked from 'marked'
import { renderMarkdown } from '../showdown'
import './style.scss'

$(document).on('content:loaded', function(event) {
  $(event.target).find('.markdown-field').each(function() {
    new SimpleMDE({
      element: this,
      status: false,
      previewRender: function(plainText, preview) {
        setTimeout(function() {
            preview.innerHTML = renderMarkdown(plainText, {})
        }, 250)
        return "Loading..."
      }
    })
  })
})
{'fraction_non_alphanumeric': 0.14684756584197925, 'fraction_numerical': 0.004788507581803671, 'mean_word_length': 3.3092783505154637, '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': '5097687', 'n_tokens_mistral': 376, 'n_tokens_neox': 369, 'n_words': 79}