Added date after title in tags section of AsciiDoc export.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
08f647f86e
commit
9196585a98
|
@ -141,14 +141,15 @@ void export_adoc(const vector<Database::entry> &entries, ostream &out)
|
||||||
<< tag.first << endl;
|
<< tag.first << endl;
|
||||||
for (const Database::entry &entry : tag.second)
|
for (const Database::entry &entry : tag.second)
|
||||||
{
|
{
|
||||||
|
const string datetime = timepoint_to_string(entry.datetime);
|
||||||
|
const string day = datetime.substr(0, datetime.find('T'));
|
||||||
string title = entry.title;
|
string title = entry.title;
|
||||||
if (title.empty())
|
if (title.empty())
|
||||||
{
|
{
|
||||||
title = "++" + entry.uri + "++";
|
title = "++" + entry.uri + "++";
|
||||||
}
|
}
|
||||||
out << endl << "* xref:dt_"
|
out << endl << "* xref:dt_" << datetime
|
||||||
<< timepoint_to_string(entry.datetime)
|
<< '[' << title << "] _(" << day << ")_" << endl;
|
||||||
<< '[' << title << ']' << endl;
|
|
||||||
}
|
}
|
||||||
out << endl;
|
out << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ SCENARIO ("The AsciiDoc export works correctly")
|
||||||
("== Tags\n\n"
|
("== Tags\n\n"
|
||||||
"=== \\[\\[t_tag1\\]\\]tag1\n\n"
|
"=== \\[\\[t_tag1\\]\\]tag1\n\n"
|
||||||
"\\* xref:dt_1970-01-01T\\d{2}:\\d{2}:\\d{2}"
|
"\\* xref:dt_1970-01-01T\\d{2}:\\d{2}:\\d{2}"
|
||||||
"\\[Nice title\\]\n\n");
|
"\\[Nice title\\] _\\(1970-01-01\\)_\n\n");
|
||||||
|
|
||||||
for (const regex &re : { re_header, re_dates, re_tags })
|
for (const regex &re : { re_header, re_dates, re_tags })
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue