<commit_before>%h3.page-title Edit mode
.file-editor
  = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do
    .file-holder
      .file-title
        %i.icon-file
        %span.file_name
          = @path
          %small
            on
            %strong= @ref
        %span.options
          .btn-group.tree-btn-group
            = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message
      .file-content.code
        %pre#editor= @blob.data

    .control-group.commit_message-group
      = label_tag 'commit_message', class: "control-label" do
        Commit message
      .controls
        = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3
    .form-actions
      = hidden_field_tag 'last_commit', @last_commit
      = hidden_field_tag 'content', '', id: "file-content"
      .commit-button-annotation
        = button_tag "Commit changes", class: 'btn commit-btn js-commit-button btn-primary'
        .message
          to branch
          %strong= @ref
      = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message

:javascript
  ace.config.set("modePath", "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
  var ace_mode = "#{@blob.language.try(:ace_mode)}";
  var editor = ace.edit("editor");
  if (ace_mode) {
    editor.getSession().setMode('ace/mode/' + ace_mode);
  }

  disableButtonIfEmptyField("#commit_message", ".js-commit-button");

  $(".js-commit-button").click(function(){
    $("#file-content").val(editor.getValue());
    $(".file-editor form").submit();
  });<commit_msg>Fix bug in ace-src-noconflict with Relative url.<commit_after>%h3.page-title Edit mode
.file-editor
  = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do
    .file-holder
      .file-title
        %i.icon-file
        %span.file_name
          = @path
          %small
            on
            %strong= @ref
        %span.options
          .btn-group.tree-btn-group
            = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message
      .file-content.code
        %pre#editor= @blob.data

    .control-group.commit_message-group
      = label_tag 'commit_message', class: "control-label" do
        Commit message
      .controls
        = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3
    .form-actions
      = hidden_field_tag 'last_commit', @last_commit
      = hidden_field_tag 'content', '', id: "file-content"
      .commit-button-annotation
        = button_tag "Commit changes", class: 'btn commit-btn js-commit-button btn-primary'
        .message
          to branch
          %strong= @ref
      = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message

:javascript
  ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
  var ace_mode = "#{@blob.language.try(:ace_mode)}";
  var editor = ace.edit("editor");
  if (ace_mode) {
    editor.getSession().setMode('ace/mode/' + ace_mode);
  }

  disableButtonIfEmptyField("#commit_message", ".js-commit-button");

  $(".js-commit-button").click(function(){
    $("#file-content").val(editor.getValue());
    $(".file-editor form").submit();
  });
{'fraction_non_alphanumeric': 0.15342701462575278, 'fraction_numerical': 0.0011471178663607685, 'mean_word_length': 2.959137343927355, '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': '6976092', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1093, 'n_words': 213}