mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
include global parameters and fixup for HTML meta-characters
This commit is contained in:
parent
f6e4a45f4b
commit
0eea021dc3
3 changed files with 21 additions and 5 deletions
|
@ -536,15 +536,21 @@ public:
|
|||
void display_module_markdown(std::ostream & out, char const* module_name) {
|
||||
lock_guard lock(*gparams_mux);
|
||||
param_descrs * d = nullptr;
|
||||
|
||||
if (module_name == std::string("global")) {
|
||||
out << "\n## Global Parameters\n\n";
|
||||
get_param_descrs().display_markdown(out);
|
||||
return;
|
||||
}
|
||||
if (!get_module_param_descr(module_name, d)) {
|
||||
std::stringstream strm;
|
||||
strm << "unknown module '" << module_name << "'";
|
||||
throw exception(std::move(strm).str());
|
||||
}
|
||||
out << "\n## Module " << module_name << "\n\n";
|
||||
out << "\n## " << module_name << "\n\n";
|
||||
char const * descr = nullptr;
|
||||
if (get_module_descrs().find(module_name, descr))
|
||||
out << "Description: " << descr << "\n";
|
||||
out << descr << "\n";
|
||||
out << "\n";
|
||||
d->display_markdown(out);
|
||||
}
|
||||
|
|
|
@ -194,9 +194,19 @@ struct param_descrs::imp {
|
|||
out << " | " << d.m_kind << " ";
|
||||
else
|
||||
out << " (" << d.m_kind << ")";
|
||||
if (markdown)
|
||||
if (markdown) {
|
||||
out << " | ";
|
||||
if (include_descr)
|
||||
std::string desc;
|
||||
for (auto ch : std::string(d.m_descr)) {
|
||||
switch (ch) {
|
||||
case '<': desc += "<"; break;
|
||||
case '>': desc += ">"; break;
|
||||
default: desc.push_back(ch);
|
||||
}
|
||||
}
|
||||
out << " " << desc;
|
||||
}
|
||||
else if (include_descr)
|
||||
out << " " << d.m_descr;
|
||||
if (markdown) {
|
||||
out << " | ";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue