<commit_before>require_relative "test_helper"

class ParserTest < MarkascendTest
  def before
    @env = {}
  end

  def test_hx
    b = Parser.new @env, "h1#centered lovely day!"
    assert_equal "<h1 id=\"centered\">lovely day!</h1>", b.parse
  end

  def test_blocked_hx
    b = Parser.new @env, "h3 followed by \\nop a block\n  content of block"
    assert_equal "<h3>followed by \\nop a block<br></h3>", b.parse
  end

  def test_rec_block
    b = Parser.new @env, <<-MA
- ul1
- ul2
  + ol1
  + ol2
- > quote1
    quote2
MA
    ol = "<ol><li>ol1</li>" + "<li>ol2</li></ol>"
    quote = "<quote>quote1<br>quote2</quote>"<commit_msg>test bar separated header id<commit_after>require_relative "test_helper"

class ParserTest < MarkascendTest
  def before
    @env = {}
  end

  def test_hx
    b = Parser.new @env, "h1#cen-tered lovely day!"
    assert_equal "<h1 id=\"cen-tered\">lovely day!</h1>", b.parse
  end

  def test_blocked_hx
    b = Parser.new @env, "h3 followed by \\nop a block\n  content of block"
    assert_equal "<h3>followed by \\nop a block<br></h3>", b.parse
  end

  def test_rec_block
    b = Parser.new @env, <<-MA
- ul1
- ul2
  + ol1
  + ol2
- > quote1
    quote2
MA
    ol = "<ol><li>ol1</li>" + "<li>ol2</li></ol>"
    quote = "<quote>quote1<br>quote2</quote>"
{'fraction_non_alphanumeric': 0.1551590380139643, 'fraction_numerical': 0.02482544608223429, 'mean_word_length': 2.9938080495356036, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 33, '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': '5353879', 'n_tokens_mistral': 521, 'n_tokens_neox': 510, 'n_words': 129}