<commit_before>import {Rx} from '@cycle/core';
import Marked from 'marked';

function createResponse$(renderer) {
  return Rx.Observable.create(observer => {
    marked(raw, (err, content) => {
      if(err) {
        observer.onError(err);
      } else {
        observer.onNext(content);
        observer.onCompleted();
      }
    });
  });
}

export default function makeMarkdownDriver(marked = new Marked()) {
  return function markdownDriver(request$) {<commit_msg>fixed<commit_after>import {Rx} from '@cycle/core';
import marked from 'markdown';

function createResponse$(renderer) {
  return Rx.Observable.create(observer => {
    renderer(raw || '', (err, content) => {
      if(err) {
        observer.onError(err);
      } else {
        observer.onNext(content);
        observer.onCompleted();
      }
    });
  });
}

function makeMarkdownDriver(marked = marked) {
  return function markdownDriver(request$) {
{'fraction_non_alphanumeric': 0.14517876489707476, 'fraction_numerical': 0.0, 'mean_word_length': 3.317757009345794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4093117', 'n_tokens_mistral': 280, 'n_tokens_neox': 273, 'n_words': 55}