<commit_before>var assert = require("assert");

require.paths.push("../src/org-js/");
var Parser        = require("parser.js").Parser;
var Node          = require("node.js").Node;
var HtmlConverter = require("converter-html.js").HtmlConverter;

module.exports = {
  "test header": function () {
    var parser = new Parser();

    assert.eql(parser.parse("* hogehoge"), [
      Node.createHeader([
        Node.createText(null, { value: "hogehoge" })
      ], { level: 1 })
    ]);
  },

  "test header3": function () {
    var parser = new Parser();

    assert.eql(parser.parse("*** hogehoge"), [
      Node.createHeader([
        Node.createText(null, { value: "hogehoge" })
      ], { level: 3 })
    ]);
  },

  "test header15": function () {
    var parser = new Parser();

    assert.eql(parser.parse("*************** hogehoge"), [
      Node.createHeader([
        Node.createText(null, { value: "hogehoge" })
      ], { level: 15 })
    ]);
  },

  "test pre": function () {
    var parser = new Parser();

    assert.eql(parser.parse(": hogehoge"), [
      Node.createPreformatted([
        Node.createText(null, { value: "hogehoge" })
      ])
    ]);
  },

  "test foo": function () {
    var parser = new Parser();

    var parsed = parser.parse([
      ": hogehoge",
      ": hugahuga",
      "This is a paragraph,",
      "desu.",
      "",
      "2nd Paragraph",
      "",
      "- foo",
      " - bar",
      "- baz"
    ].join("\n"));

    console.log(HtmlConverter.convertNodes(parsed));
    console.dir(parsed);
    console.log(JSON.stringify(parsed, null, 1));
  }
};<commit_msg>new style test<commit_after>var assert = require("assert");

require.paths.push("../src/org-js/");
var Parser            = require("parser.js").Parser;
var Node              = require("node.js").Node;
var HtmlTextConverter = require("converter-html.js").HtmlTextConverter;

module.exports = {
  "test foo": function () {
    var parser = new Parser();

    var doc = parser.parse([
      ": hogehoge",
      ": hugahuga",
      "This is a paragraph,",
      "desu.",
      "",
      "2nd Paragraph",
      "",
      "- foo",
      " - bar :: hoge",
      "- baz"
    ].join("\n"));

    console.log(HtmlTextConverter.convertNodes(doc.nodes));
    console.dir(doc);
    console.log(JSON.stringify(doc, null, 1));
  }
};
{'fraction_non_alphanumeric': 0.19456427955133737, 'fraction_numerical': 0.004745470232959448, 'mean_word_length': 2.4304733727810652, 'pattern_counts': {'":': 11, '<': 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': '7180814', 'n_tokens_mistral': 776, 'n_tokens_neox': 754, 'n_words': 145}