Skip to content

Commit 48fe639

Browse files
committed
Make bew node2html for Defn
1 parent e47ae81 commit 48fe639

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/Pod/To/HTML.pm

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,6 @@ multi sub node2html(Pod::Block::Named $node) {
339339
return node2html($node.contents);
340340
}
341341
when 'para' { return node2html($node.contents[0]); }
342-
when 'defn' {
343-
return "<dl>" ~
344-
"<dt>" ~ node2html($node.contents[0].contents[1]) ~ "</dt>" ~
345-
"<dd>" ~ node2html($node.contents[0].contents[2..*-1]) ~ "</dd>" ~
346-
"</dl>\n" ~
347-
node2html($node.contents[1..*-1]);
348-
}
349342
when 'Image' {
350343
my $url;
351344
if $node.contents == 1 {
@@ -438,6 +431,14 @@ multi sub node2html(Pod::Config $node) {
438431
return '';
439432
}
440433
434+
multi sub node2html(Pod::Defn $node) {
435+
436+
return "<dl>" ~
437+
"<dt>" ~ node2html($node.term) ~ "</dt>" ~
438+
"<dd>" ~ node2html($node.contents) ~ "</dd>" ~
439+
"</dl>\n";
440+
}
441+
441442
# TODO: would like some way to wrap these and the following content in a <section>; this might be
442443
# the same way we get lists working...
443444
multi sub node2html(Pod::Heading $node) {

0 commit comments

Comments
 (0)