Skip to content

Commit

Permalink
add code to deal with XHTML Headers: metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
perigrin committed Oct 17, 2009
1 parent 1782445 commit 7a9f272
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Text/MultiMarkdown.pm
Expand Up @@ -776,6 +776,9 @@ sub _xhtmlMetaData {
elsif (lc($key) eq "css") {
$result.= qq[\t\t<link type="text/css" rel="stylesheet" href="$self->{_metadata}{$key}"$self->{empty_element_suffix}\n];
}
elsif( lc($key) eq "xhtml header") {
$result .= qq[\t\t$self->{_metadata}{$key}\n]
}
else {
$result.= qq[\t\t<meta name="$key" content="$self->{_metadata}{$key}"$self->{empty_element_suffix}\n];
}
Expand Down
9 changes: 9 additions & 0 deletions t/Text-MultiMarkdown.mdtest/XHTML_Headers.text
@@ -0,0 +1,9 @@
Title: MultiMarkdown Test Document
Author: Fletcher T. Penney, MD
Date: January 14, 2006
Format: complete
Css: http://some.url/sample.css
XHTML Header: <link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://openid.org/example" />

Intro: This is the first paragraph.
15 changes: 15 additions & 0 deletions t/Text-MultiMarkdown.mdtest/XHTML_Headers.xhtml
@@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta name="Author" content="Fletcher T. Penney, MD" />
<link type="text/css" rel="stylesheet" href="http://some.url/sample.css" />
<meta name="Date" content="January 14, 2006" />
<meta name="Format" content="complete" />
<title>MultiMarkdown Test Document</title>
<link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://openid.org/chris" />
</head>
<body>
<p>Intro: This is the first paragraph.</p>
</body>
</html>

0 comments on commit 7a9f272

Please sign in to comment.