Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ef3c5dad

Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt

  • ID ef3c5dadc095360101f9e9b9f84914525e4cf2bb
  • Vorgänger 43a3d479
  • Nachfolger 84f80318

Hilfesystem: refactor für leichtere Tests

Unterschiede anzeigen:

SL/HelpSystem.pm
53 53

  
54 54
  my $file_name = $self->file_name_for_page(%page);
55 55

  
56
  return -f $file_name ? $self->driver->convert_to_html($file_name) : undef;
56
  return -f $file_name ? $self->driver->convert_page_to_html($file_name) : undef;
57 57
}
58 58

  
59 59
sub sanitize {
SL/HelpSystem/MultiMarkdown.pm
21 21

  
22 22
sub file_name_extension { "mmd" }
23 23

  
24
sub convert_to_html {
24
sub convert_page_to_html {
25 25
  my ($self, $file_name) = @_;
26 26

  
27 27
  my $markup = Encode::decode('utf-8', scalar(File::Slurp::slurp($file_name)));
28
  my $html   = $self->multimarkdown->markdown($markup);
29
  $html      = $self->_processh_intra_help_links($html);
28
  return $self->convert_content_to_html($markup);
29
}
30

  
31
sub convert_content_to_html {
32
  my ($self, $content) = @_;
33

  
34
  my $html = $self->multimarkdown->markdown($content);
35
  $html    = $self->_processh_intra_help_links($html);
30 36

  
31 37
  return $html;
32 38
}

Auch abrufbar als: Unified diff