-
-
Save vti/36e4f7c102ae174b3d3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Mojolicious/Plugin/PodRenderer.pm b/lib/Mojolicious/Plugin/PodRenderer.pm | |
index 8f6bee5..443931c 100644 | |
--- a/lib/Mojolicious/Plugin/PodRenderer.pm | |
+++ b/lib/Mojolicious/Plugin/PodRenderer.pm | |
@@ -62,8 +62,8 @@ sub _pod_to_html { | |
return $@ if $@; | |
# Filter | |
- $output =~ s/<a name='___top' class='dummyTopAnchor'\s*><\/a>\n//g; | |
- $output =~ s/<a class='u'.*name=".*"\s*>(.*)<\/a>/$1/sg; | |
+ $output =~ s/<a name='___top' class='dummyTopAnchor'\s*?><\/a>\n//g; | |
+ $output =~ s/<a class='u'.*?name=".*?"\s*>(.*?)<\/a>/$1/sg; | |
return $output; | |
} | |
diff --git a/t/mojolicious/pod_renderer_lite_app.t b/t/mojolicious/pod_renderer_lite_app.t | |
index 1e3f0d3..84e67e8 100644 | |
--- a/t/mojolicious/pod_renderer_lite_app.t | |
+++ b/t/mojolicious/pod_renderer_lite_app.t | |
@@ -48,7 +48,7 @@ $t->get_ok('/')->status_is(200) | |
# POD helper | |
$t->post_ok('/')->status_is(200) | |
- ->content_like(qr/test123\s+<h1>lalala<\/h1>\s+<p><code>test<\/code><\/p>/); | |
+ ->content_like(qr/test123\s+<h1>lalala<\/h1>\s+<h1>lololo<\/h1>\s+<p><code>test<\/code><\/p>/); | |
# POD filter | |
$t->post_ok('/block')->status_is(200) | |
@@ -57,7 +57,7 @@ $t->post_ok('/block')->status_is(200) | |
__DATA__ | |
@@ index.html.ep | |
-test123<%= pod_to_html "=head1 lalala\n\nC<test>"%> | |
+test123<%= pod_to_html "=head1 lalala\n\n=head1 lololo\n\nC<test>"%> | |
@@ block.html.ep | |
test321<%= pod_to_html begin %>=head2 lalala |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment