<commit_before>module ReactjsHelper
  def mount_react_component(name, selector, data = [])
    javascript_tag(:defer => 'defer') do
      "$(ManageIQ.react.mount('#{name}', '#{selector}', #{data.to_json}));".html_safe
    end
  end

  def react(name, data = {})
    uid = unique_html_id('react')
    capture do
      concat(tag('div', :id => uid))
      concat(javascript_tag("ManageIQ.component.componentFactory('#{j(name)}', '##{j(uid)}', #{data.to_json})"))
    end
  end
end<commit_msg>Make sure that react helper always closes the div tag<commit_after>module ReactjsHelper
  def mount_react_component(name, selector, data = [])
    javascript_tag(:defer => 'defer') do
      "$(ManageIQ.react.mount('#{name}', '#{selector}', #{data.to_json}));".html_safe
    end
  end

  def react(name, data = {})
    uid = unique_html_id('react')
    capture do
      concat(content_tag('div', nil, :id => uid))
      concat(javascript_tag("ManageIQ.component.componentFactory('#{j(name)}', '##{j(uid)}', #{data.to_json})"))
    end
  end
end
{'fraction_non_alphanumeric': 0.1868344627299129, 'fraction_numerical': 0.0, 'mean_word_length': 4.4136125654450264, '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': '2462644', 'n_tokens_mistral': 357, 'n_tokens_neox': 347, 'n_words': 69}