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;
|
||||
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;
|
||||
if (title.empty())
|
||||
{
|
||||
title = "++" + entry.uri + "++";
|
||||
}
|
||||
out << endl << "* xref:dt_"
|
||||
<< timepoint_to_string(entry.datetime)
|
||||
<< '[' << title << ']' << endl;
|
||||
out << endl << "* xref:dt_" << datetime
|
||||
<< '[' << title << "] _(" << day << ")_" << endl;
|
||||
}
|
||||
out << endl;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ SCENARIO ("The AsciiDoc export works correctly")
|
|||
("== Tags\n\n"
|
||||
"=== \\[\\[t_tag1\\]\\]tag1\n\n"
|
||||
"\\* 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 })
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue