endidx = len(lines)-1
curlines = []
- ops_startline = ["<li>", "@param", "@returns", "@warning", "@ingroup", "@author", "@date", "@related", "@relates", "@relatesalso", "@deprecated", "@image", "@return", "@brief", "@attention", "@copydoc", "@addtogroup", "@todo", "@tparam", "@skip", "@skipline", "@until", "@line", "@dontinclude", "@include", "@see", "@note"]
+ ops_startline = ["<li>", "@param", "@returns", "@warning", "@ingroup", "@author", "@date", "@related", "@relates", "@relatesalso", "@deprecated", "@image", "@return", "@brief", "@attention", "@copydoc", "@addtogroup", "@todo", "@tparam", "@see", "@note", "@skip", "@skipline", "@until", "@line", "@dontinclude", "@include"]
# subset of ops_startline that does not want stuff from the next line appended
# to this.
- ops_also_end_paragraph = ["@image"]
+ ops_also_end_paragraph = ["@image", "@skip", "@skipline", "@until", "@line", "@dontinclude", "@include"]
# stuff handled in the while loop down: @code, @verbatim, @f @ref
out.append(lines[idx].rstrip())
else:
curlines.append(lines[idx])
- elif one_in(["@code", "@verbatim", "@f["], lines[idx]):
+ elif one_in(["@code", "@verbatim", "@f[", "@f{"], lines[idx]):
+ if "@f{" in lines[idx]:
+ if not lines[idx].endswith("}{"):
+ print ("%s warning malformed @f{*}{"%(infostr), file=sys.stderr)
if curlines!=[]:
out.extend(wrap_block(remove_junk(curlines), start))
curlines=[]
else:
thisline = start + thisline.strip()[2:]
out.append(thisline.rstrip())
- if one_in(["@endcode", "@endverbatim", "@f]"], lines[idx]):
+ if one_in(["@endcode", "@endverbatim", "@f]", "@f}"], lines[idx]):
break
idx += 1
elif lines[idx].strip()=="*":
lineO = lineI
assert(format_block(lineI)==lineO)
+# @f{}
+lineI = [" /**", \
+ " * Hello:", \
+ " * @f{aligned*}{", \
+ " * A\\\\", \
+ " * B", \
+ " * @f}", \
+ " * bla", \
+ " */"]
+lineO = lineI
+assert(format_block(lineI)==lineO)
+# @until
+lineI = [" /**", \
+ " * Hello:", \
+ " * @include a", \
+ " * bla", \
+ " * @dontinclude a", \
+ " * bla", \
+ " * @line a", \
+ " * bla", \
+ " * @skip a", \
+ " * bla", \
+ " * @until a", \
+ " * bla", \
+ " */"]
+lineO = lineI
+#print (lineI, "\n",format_block(lineI))
+assert(format_block(lineI)==lineO)
# now open the file and do the work