Skip to content

Commit 9fea6b6

Browse files
authored
Merge pull request #53 from finanalyst/master
remove double escaped title / subtitle
2 parents f5ea68c + b5ce162 commit 9fea6b6

File tree

2 files changed

+4
-53
lines changed

2 files changed

+4
-53
lines changed

lib/Pod/To/HTML.pm

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -199,56 +199,7 @@ sub pod2html(
199199
:@body,
200200
:footnotes( do-footnotes ),
201201
:$footer).hash
202-
);
203-
204-
=comment out
205-
my $prelude = qq:to/END/;
206-
<!doctype html>
207-
<html lang="$lang">
208-
<head>
209-
<title>{ $title_html }</title>
210-
<meta charset="UTF-8" />
211-
<style>
212-
/* code gets the browser-default font
213-
* kbd gets a slightly less common monospace font
214-
* samp gets the hard pixelly fonts
215-
*/
216-
kbd \{ font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace }
217-
samp \{ font-family: "Terminus", "Courier", "Lucida Console", monospace }
218-
/* WHATWG HTML frowns on the use of <u> because it looks like a link,
219-
* so we make it not look like one.
220-
*/
221-
u \{ text-decoration: none }
222-
.nested \{
223-
margin-left: 3em;
224-
}
225-
// footnote things:
226-
aside, u \{ opacity: 0.7 }
227-
a[id^="fn-"]:target \{ background: #ff0 }
228-
</style>
229-
{ qq|<link rel="stylesheet" href="$css-url">| if $css-url }
230-
{ do-metadata() // () }
231-
$head
232-
</head>
233-
<body class="pod">
234-
<div id="___top"></div>
235-
$header
236-
END
237-
=comment out
238-
return join(qq{\n},
239-
$prelude,
240-
( $title.defined ?? "<h1 class='title'>{$title_html}</h1>"
241-
!! () ),
242-
( $subtitle.defined ?? "<p class='subtitle'>{$subtitle}</p>"
243-
!! () ),
244-
( my $ToC := do-toc($pod) // () ),
245-
'<div class="pod-body', ($ToC ?? '' !! ' no-toc'), '">',@body,'</div>',
246-
do-footnotes(),
247-
$footer,
248-
'</body>',
249-
"</html>\n"
250-
);
251-
202+
)
252203
}
253204

254205
#| Returns accumulated metadata as a string of C«<meta>» tags

resources/templates/main.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22
<html lang="{{ lang }}">
33
<head>
4-
<title>{{ title }}</title>
4+
<title>{{{ title }}}</title>
55
<meta charset="UTF-8" />
66
<style>
77
kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace }
@@ -20,8 +20,8 @@
2020
<body class="pod">
2121
<div id="___top"></div>
2222
{{{ header }}}
23-
{{# title }}<h1 class='title'>{{ title }}</h1>{{/ title }}
24-
{{# subtitle }}<p class='subtitle'>{{ subtitle }}</p>{{/ subtitle }}
23+
{{# title }}<h1 class='title'>{{{ title }}}</h1>{{/ title }}
24+
{{# subtitle }}<p class='subtitle'>{{{ subtitle }}}</p>{{/ subtitle }}
2525
{{# toc }}{{{ toc }}}{{/ toc }}
2626
<div class="pod-body{{^ toc }} no-toc{{/ toc }})">
2727
{{# body }}{{{ . }}}{{/ body }}

0 commit comments

Comments
 (0)