<commit_before>(function ($) {

  var $fieldset = $('#user-needs');

  // Shrink fieldset if user needs have been provided
  if ($('#edition_user_need_ids').val() !== null) {
    var $heading = $fieldset.find('h2');
    $heading
      .text($heading.text() + ' (click to show/hide)')
      .addClass('enhanced')
      .click(function() {
        $(this).nextAll().slideToggle();
      }).click();
  }

  // Autocomplete fields to reduce duplicates
  $fieldset.find('.user-need-input').each(function(index, input) {
    $(input).autocomplete({
      source: $(input).data('source'),
      autoFocus: true
    });
  });

  // Add user needs with ajax
  var addContainer = $('.js-add-user-need');

  function submitForm() {
    var data = {
      user: $.trim(addContainer.find('#edition_user_needs_attributes_0_user').val()),
      need: $.trim(addContainer.find('#edition_user_needs_attributes_0_need').val()),
      goal: $.trim(addContainer.find('#edition_user_needs_attributes_0_goal').val()),<commit_msg>Make user needs on detailed guides always show<commit_after>(function ($) {

  var $fieldset = $('.user-needs');

  // Autocomplete fields to reduce duplicates
  $fieldset.find('.user-need-input').each(function(index, input) {
    $(input).autocomplete({
      source: $(input).data('source'),
      autoFocus: true
    });
  });

  // Add user needs with ajax
  var addContainer = $('.js-add-user-need');

  function submitForm() {
    var data = {
      user: $.trim(addContainer.find('#edition_user_needs_attributes_0_user').val()),
      need: $.trim(addContainer.find('#edition_user_needs_attributes_0_need').val()),
      goal: $.trim(addContainer.find('#edition_user_needs_attributes_0_goal').val()),
{'fraction_non_alphanumeric': 0.18028004667444575, 'fraction_numerical': 0.004084014002333722, 'mean_word_length': 3.777158774373259, 'pattern_counts': {'":': 0, '<': 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': '5281110', 'n_tokens_mistral': 555, 'n_tokens_neox': 521, 'n_words': 97}