<commit_before>package EnsEMBL::Web::Document::Panel::Ajax;

use strict;
use Data::Dumper qw(Dumper);

use base qw(EnsEMBL::Web::Document::Panel);

sub _start {
  my $self = shift;
}

sub _end   { 
  my $self = shift;
}

sub add_row {
  my $self = shift;

}
sub render {
  my( $self, $first ) = @_;
  my $content = '';
  if( $self->{'delayed_write'} ) {
    $content = $self->_content_delayed();
  }

  if( $self->{'_delayed_write_'} ) {
    $self->renderer->print($content);
  } else {
    $self->content();
  }
}

sub _error {
  my( $self, $caption, $body ) = @_;
  $self->printf( '
<h1>AJAX error - %s</h1>
<pre>
%s
</pre>',
    $caption, $body
  );
}

1;<commit_msg>removed double pre bug<commit_after>package EnsEMBL::Web::Document::Panel::Ajax;

use strict;
use Data::Dumper qw(Dumper);

use base qw(EnsEMBL::Web::Document::Panel);

sub _start {
  my $self = shift;
}

sub _end   { 
  my $self = shift;
}

sub add_row {
  my $self = shift;

}
sub render {
  my( $self, $first ) = @_;
  my $content = '';
  if( $self->{'delayed_write'} ) {
    $content = $self->_content_delayed();
  }

  if( $self->{'_delayed_write_'} ) {
    $self->renderer->print($content);
  } else {
    $self->content();
  }
}

sub _error {
  my( $self, $caption, $body ) = @_;
  $self->printf( '
<h1>AJAX error - %s</h1>%s',
    $caption, $body
  );
}

1;
{'fraction_non_alphanumeric': 0.20898876404494382, 'fraction_numerical': 0.0044943820224719105, 'mean_word_length': 3.366013071895425, 'pattern_counts': {'":': 0, '<': 9, '<?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': '5889004', 'n_tokens_mistral': 567, 'n_tokens_neox': 558, 'n_words': 113}