Skip to content

Commit

Permalink
Add global variable for docno of current standard reference
Browse files Browse the repository at this point in the history
Also remove extra <p> around build timestamps.
  • Loading branch information
jwakely committed Jan 25, 2024
1 parent 4df3099 commit 9dcdcb0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/report_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ auto utc_timestamp() -> std::tm const & {
}

// global data - would like to do something about that.
static std::string const build_timestamp{format_time("<p>Revised %Y-%m-%d at %H:%M:%S UTC</p>\n", utc_timestamp())};
static std::string const build_timestamp{format_time("Revised %Y-%m-%d at %H:%M:%S UTC\n", utc_timestamp())};

static std::string const maintainer_email{"[email protected]"};

static std::string const maintainer_name{"Jonathan Wakely"};

static std::string const is14882_docno{"ISO/IEC IS 14882:2020(E)"};

struct order_by_first_tag {
bool operator()(lwg::issue const & x, lwg::issue const & y) const noexcept {
Expand Down Expand Up @@ -650,7 +651,7 @@ void report_generator::make_sort_by_num(std::vector<issue>& issues, fs::path con
out <<
R"(<h1>C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision() << R"()</h1>
<h1>Table of Contents</h1>
<p>Reference ISO/IEC IS 14882:2020(E)</p>
<p>Reference )" << is14882_docno << R"(</p>
<p>This document is the Table of Contents for the <a href="lwg-active.html">Library Active Issues List</a>,
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.</p>
)";
Expand All @@ -672,7 +673,7 @@ void report_generator::make_sort_by_priority(std::vector<issue>& issues, fs::pat
out <<
R"(<h1>C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision() << R"()</h1>
<h1>Table of Contents</h1>
<p>Reference ISO/IEC IS 14882:2020(E)</p>
<p>Reference )" << is14882_docno << R"(</p>
<p>This document is the Table of Contents for the <a href="lwg-active.html">Library Active Issues List</a>,
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.</p>
)";
Expand Down Expand Up @@ -713,7 +714,7 @@ void report_generator::make_sort_by_status(std::vector<issue>& issues, fs::path
out <<
R"(<h1>C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision() << R"()</h1>
<h1>Index by Status and Section</h1>
<p>Reference ISO/IEC IS 14882:2020(E)</p>
<p>Reference )" << is14882_docno << R"(</p>
<p>
This document is the Index by Status and Section for the <a href="lwg-active.html">Library Active Issues List</a>,
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.
Expand Down Expand Up @@ -748,7 +749,7 @@ void report_generator::make_sort_by_status_mod_date(std::vector<issue> & issues,
out <<
R"(<h1>C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision() << R"()</h1>
<h1>Index by Status and Date</h1>
<p>Reference ISO/IEC IS 14882:2020(E)</p>
<p>Reference )" << is14882_docno << R"(</p>
<p>
This document is the Index by Status and Date for the <a href="lwg-active.html">Library Active Issues List</a>,
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.
Expand Down Expand Up @@ -793,7 +794,7 @@ void report_generator::make_sort_by_section(std::vector<issue>& issues, fs::path

out << "<h1>C++ Standard Library Issues List (Revision " << lwg_issues_xml.get_revision() << ")</h1>\n";
out << "<h1>Index by Section</h1>\n";
out << "<p>Reference ISO/IEC IS 14882:2020(E)</p>\n";
out << "<p>Reference " << is14882_docno << "</p>\n";
out << "<p>This document is the Index by Section for the <a href=\"lwg-active.html\">Library Active Issues List</a>";
if(!active_only) {
out << ", <a href=\"lwg-defects.html\">Library Defect Reports and Accepted Issues</a>, and <a href=\"lwg-closed.html\">Library Closed Issues List</a>";
Expand Down

0 comments on commit 9dcdcb0

Please sign in to comment.