Skip to content
Snippets Groups Projects
Commit 57145a56 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

added <body>

Rev: bin/htmlify_docs.lpc:1.2
parent 7b02268b
No related branches found
No related tags found
No related merge requests found
...@@ -205,6 +205,18 @@ string html_unquote(string s) ...@@ -205,6 +205,18 @@ string html_unquote(string s)
return replace(s,({"&amp;","&lt;","&gt;"}),({"&","<",">"})); return replace(s,({"&amp;","&lt;","&gt;"}),({"&","<",">"}));
} }
string mkdocument(string s,string title)
{
return ("<html>"+
"<title>"+
html_quote(title)+
"</title>"+
"<body bgcolor=\"#A0E0C0\">"+
s+
"</body>"+
"</html>");
}
string convert_page(string path, string fname) string convert_page(string path, string fname)
{ {
string output, short; string output, short;
...@@ -332,8 +344,7 @@ string convert_page(string path, string fname) ...@@ -332,8 +344,7 @@ string convert_page(string path, string fname)
"\n</a>\n"; "\n</a>\n";
} }
} }
output="<html><title>uLPC: "+name+"</title>"+ output=mkdocument(implode(parts,"<hr noshade size=1>\n"),"uLPC: "+name);
implode(parts,"<hr noshade size=1>\n");
} }
return output; return output;
} }
...@@ -408,9 +419,9 @@ string mkindex() ...@@ -408,9 +419,9 @@ string mkindex()
ret=""; ret="";
ret+="<H1>"+version()+"</h1>\n"; ret+="<H1>"+version()+" index</h1>\n";
ret+="<H1>Keyword lists</H1>\n<dl>\n"; ret+="<H2><b>Keyword lists</b></H2>\n<dl>\n";
foreach(sort_array(m_indices(keywords)),b) foreach(sort_array(m_indices(keywords)),b)
{ {
ret+="<a name="+b+">"; ret+="<a name="+b+">";
...@@ -460,7 +471,7 @@ string mkindex() ...@@ -460,7 +471,7 @@ string mkindex()
} }
ret+="</ul>\n"; ret+="</ul>\n";
return ret; return mkdocument(ret,"uLPC documentation index");
} }
int main(int argc, string *argv) int main(int argc, string *argv)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment