fix: avoid duplicating comment: array/table elems

This commit is contained in:
ToruNiina 2019-06-18 01:26:40 +09:00
parent 86e55c3bf7
commit 262f9c5fcc

View File

@ -304,6 +304,12 @@ struct region final : public region_base
// # this also.
// a = value # not this.
// ```
// # this is a comment for `a`, not array elements.
// a = [1, 2, 3, 4, 5]
if(this->first() == std::find_if(this->line_begin(), this->first(),
[](const char c) noexcept -> bool {return c == '[' || c == '{';}))
{
auto iter = this->line_begin(); // points the first character
while(iter != this->begin())
{
@ -338,6 +344,7 @@ struct region final : public region_base
iter = line_start;
}
}
}
if(com.size() > 1)
{