Skip to content

Commit

Permalink
- Use as_XML instead of as_HTML as it doesn't seem to move stuff arou…
Browse files Browse the repository at this point in the history
…nd as much

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10952 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jan 24, 2012
1 parent cd403ac commit 9181dd0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Examples/GenerateDoc.mos
Expand Up @@ -97,10 +97,11 @@ protected
String compound := \"\", file;
algorithm
head :=
\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\"
\\\"http://www.w3.org/TR/html4/loose.dtd\\\">
\"<head>
<link href=\\\"style.css\\\" rel=\\\"stylesheet\\\" type=\\\"text/css\\\" />
<title>\"+sum(s + \".\" for s in strs[1:end-1])+strs[end]+\"</title>
</head>
<body>
<h1><a href = \\\"index.html\\\">.</a>\";
for ident in strs[1:end-1] loop
compound := if compound == \"\" then ident else compound+\".\"+ident;
Expand All @@ -121,7 +122,7 @@ algorithm
then preSuffixIfNotEmpty(\"<h2><a name=\\\"info\\\">Information</a></h2><pre>\", item.comment, \"</pre>\")
else \"<h2><a name=\\\"info\\\">Information</a></h2>\" + item.docInfo[1];
revision := if item.docInfo[2] <> \"\" then \"<h2><a name=\\\"revisions\\\">Revisions</a></h2>\" + item.docInfo[2] else \"\";
res := item.head + docInfo + item.interface + item.short + item.contents + revision + version;
res := item.head + docInfo + item.interface + item.short + item.contents + revision + version + \"</body>\";
end itemString;

function itemFile
Expand Down Expand Up @@ -240,7 +241,8 @@ for (@{ $tree->extract_links('a', 'img') }) {
}

open (MYFILE, \">$file\");
print MYFILE $tree->as_HTML;
binmode MYFILE, \":utf8\";
print MYFILE $tree->as_XML;
close (MYFILE);

system(\"echo Checking file \\\"$file\\\" >>tidy.2.log\");
Expand Down

0 comments on commit 9181dd0

Please sign in to comment.