Browse files

add code to deal with XHTML Headers: metadata

  • Loading branch information...
1 parent 1782445 commit 7a9f2724601bae34f1a0dc8d2c0525d1a46feb62 @perigrin perigrin committed Oct 17, 2009
View
3 lib/Text/MultiMarkdown.pm
@@ -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];
}
View
9 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.
View
15 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.