Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pod::To::HTML eliminated from class names in external files.
Refs #55. Still the same problem with strings, but that's not a
blocker right now. Please @kivikakk download new version to check this
works correctly, ping me if it does not.
  • Loading branch information
JJ committed Dec 14, 2018
1 parent 74b9644 commit cdc6266
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2018-12-14 Juan J. merelo <jmerelo@penny>

* 011-external.t: Adds teste mainly for integration with GitHub, and avoiding prepending package names to defined classes.

2018-12-11 Juan J. merelo <jmerelo@penny>

* META6.json: Bumps up to 0.4.1 after fixing the problem of URIzing titles and subtitles.
Expand Down
5 changes: 3 additions & 2 deletions META6.json
@@ -1,13 +1,14 @@
{
"perl" : "6.*",
"name" : "Pod::To::HTML",
"version" : "0.4.1",
"version" : "0.5.0",
"author" : "Perl 6",
"description" : "Convert Perl 6 Pod to HTML",
"license" : "Artistic-2.0",
"depends" : [
"URI",
"Template::Mustache"
"Template::Mustache",
"Pod::Load"
],
"test-depends" : ["Test::Output"],
"provides" : {
Expand Down
4 changes: 3 additions & 1 deletion lib/Pod/To/HTML.pm
Expand Up @@ -4,6 +4,7 @@ use MONKEY-SEE-NO-EVAL;

use URI::Escape;
use Template::Mustache;
use Pod::Load;

#try require Term::ANSIColor <&colored>;
#if &colored.defined {
Expand All @@ -27,7 +28,8 @@ multi method render(Pod::Block $pod, Str :$header = '', Str :$footer = '', Str :
}

multi method render(IO::Path $file, Str :$header = '', Str :$footer = '', Str :head-fields($head) = '', :$default-title = '', :$lang = 'en') {
pod2html(EVAL($file.slurp ~ "\n\$=pod"), :$header, :$footer, :$head, :$default-title, :$lang);

pod2html(load($file), :$header, :$footer, :$head, :$default-title, :$lang);
}

multi method render(Str $pod-string, Str :$header = '', Str :$footer = '', Str :head-fields($head) = '', :$default-title = '', :$lang = 'en') {
Expand Down
3 changes: 2 additions & 1 deletion t/011-external.t
@@ -1,6 +1,6 @@
use Test; # -*- mode: perl6 -*-
use Pod::To::HTML;
plan 6;
plan 8;

use MONKEY-SEE-NO-EVAL;

Expand All @@ -16,6 +16,7 @@ sub test-files( $possible-file-path ) {

my $a-pod = $example-path.IO.slurp;
my $rendered= Pod::To::HTML.render($example-path.IO);
unlike( $rendered, /Pod\:\:To/, "Is not prepending class name" );
my $pod = (EVAL ($a-pod ~ "\n\$=pod")); # use proved pod2onebigpage method
my $r = node2html $pod;
ok( $r, "Converting external" );
Expand Down

1 comment on commit cdc6266

@kivikakk
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.