18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 11:47:06 +01:00

Merge branch 'feat/editor-model-in-editor' into feat/editor-legacy-takeover

The section of the anchors is read as anchor records here, its comments skipped as in the rest of the file: the fix of #461 keeping
the lines of the section as they were read doesn't apply, and its test gives way to this branch's.
This commit is contained in:
maj00r
2026-11-29 22:37:45 +01:00
13 changed files with 199 additions and 24 deletions
+8 -5
View File
@@ -209,13 +209,16 @@ class record
fail(std::format("'{}' isn't a profile of the norms", text));
return norms::profile_id::plk;
}
// the rest of the line as it is written, the blanks between the words kept as one
// the rest of the line as it is written, from its next word to its last, the blanks between the words as they are: joined with one
// blank, a reason of two blanks came back changed after a save and a load
std::string rest()
{
std::string result;
for (; false == done(); ++m_at)
result += (result.empty() ? "" : " ") + std::string{m_words[m_at]};
return result;
if (done())
return {};
auto const first{m_words[m_at]};
auto const last{m_words.back()};
m_at = m_words.size();
return std::string(first.data(), static_cast<std::size_t>(last.data() + last.size() - first.data()));
}
void finish()
{