Skip to content

Commit

Permalink
proper literal quote for function comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Dec 20, 2018
1 parent 4593658 commit 79083ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion UsersGuide/interface.mos
Expand Up @@ -17,9 +17,12 @@ protected
String strs[:] = OpenModelica.Scripting.typeNameStrings(cl);
String doc[3] = OpenModelica.Scripting.getDocumentationAnnotation(cl);
String doc1 = doc[1];
String cmt = \"\";
algorithm
out := \"\\n.. _\" + strs[end] + \" :\\n\\n\" + strs[end] + \"\\n\" + sum(\"^\" for c in 1:stringLength(strs[end])) + \"\\n\";
out := out + sum(\"``\" + trim(l) + \"``\\n\" for l in OpenModelica.Scripting.strtok(OpenModelica.Scripting.getClassComment(cl), \"\\n\"));
cmt := sum(\" \" + trim(l) + \"\\n\" for l in OpenModelica.Scripting.strtok(OpenModelica.Scripting.getClassComment(cl), \"\\n\"));
cmt := if (cmt == \"\") then \"\" else \"::\\n\\n\" + cmt + \"\\n\";
out := out + cmt;
OpenModelica.Scripting.writeFile(\"tmp/interface.inc.tmp\", doc1, false);
// Disable wrapping in order to fix some modelica:// links
OpenModelica.Scripting.system(\"pandoc --wrap=none -t rst -f html -o tmp/interface.inc.tmp.rst tmp/interface.inc.tmp\");
Expand Down

0 comments on commit 79083ae

Please sign in to comment.