<commit_before>require 'helper'
require 'erb'

class TestSlimEmbeddedTemplats < TestSlim
  def test_render_with_embedded_template
    source = %q{
p
  erb:
    <b>Hello from <%= 'erb'.upcase %>!</b>
    Second Line!
}

    assert_html "<p><b>Hello from ERB!</b>\nSecond Line!\n</p>", source
  end

  def test_render_with_interpolated_embedded_template
    source = %q{
markdown:
  Hello from #{"Markdown!"}
  Second Line!
}
    assert_html "<p>Hello from Markdown!\nSecond Line!</p>\n", source
  end

  def test_render_with_javascript
    source = %q{
javascript:   
  $(function() {});
}<commit_msg>just a silly little addition to the markdown test<commit_after>require 'helper'
require 'erb'

class TestSlimEmbeddedTemplats < TestSlim
  def test_render_with_embedded_template
    source = %q{
p
  erb:
    <b>Hello from <%= 'erb'.upcase %>!</b>
    Second Line!
}

    assert_html "<p><b>Hello from ERB!</b>\nSecond Line!\n</p>", source
  end

  def test_render_with_interpolated_embedded_template
    source = %q{
markdown:
  #Header
  Hello from #{"Markdown!"}
  Second Line!
}
    assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!\nSecond Line!</p>\n", source
  end

  def test_render_with_javascript
    source = %q{
javascript:   
  $(function() {});
}
{'fraction_non_alphanumeric': 0.1359683794466403, 'fraction_numerical': 0.0015810276679841897, 'mean_word_length': 4.003952569169961, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '7541181', 'n_tokens_mistral': 474, 'n_tokens_neox': 452, 'n_words': 107}