If an item tag is already set, don't overwrite it
This commit is contained in:
parent
badea00584
commit
69e2c733b9
1 changed files with 2 additions and 1 deletions
|
|
@ -140,7 +140,8 @@ void item_t::parse_tags(const char * p, int current_year)
|
||||||
q = std::strtok(NULL, " \t")) {
|
q = std::strtok(NULL, " \t")) {
|
||||||
const std::size_t len = std::strlen(q);
|
const std::size_t len = std::strlen(q);
|
||||||
if (! tag.empty()) {
|
if (! tag.empty()) {
|
||||||
set_tag(tag, string(p + (q - buf.get())));
|
if (! has_tag(tag))
|
||||||
|
set_tag(tag, string(p + (q - buf.get())));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (q[0] == ':' && q[len - 1] == ':') { // a series of tags
|
else if (q[0] == ':' && q[len - 1] == ':') { // a series of tags
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue