Skip to content

Commit f810c3e

Browse files
committed
some prefix stuff
1 parent 5cc6552 commit f810c3e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/cgspell.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,32 @@ void print_cg_subreading(size_t indent, const string& form,
5656
variant<Nothing, Weight> mw_a, const std::string& errtag) {
5757
os << string(indent, '\t');
5858
bool in_lemma = false;
59+
bool in_prefixes = true;
60+
vector<string> prefixes;
5961
for (vector<string>::const_iterator it = beg; it != end; ++it) {
6062
bool is_tag = is_cg_tag(*it);
6163
if (in_lemma) {
6264
if (is_tag) {
6365
in_lemma = false;
6466
os << "\"";
67+
for (auto prefix : prefixes) {
68+
os << " Prefix/" << prefix;
69+
}
6570
}
6671
}
6772
else {
6873
if (!is_tag) {
6974
in_lemma = true;
75+
in_prefixes = false;
7076
os << "\"";
7177
}
7278
}
73-
os << (*it);
79+
if ((in_prefixes) && (!in_lemma)) {
80+
prefixes.push_back(*it);
81+
}
82+
else {
83+
os << (*it);
84+
}
7485
}
7586
if (in_lemma) {
7687
os << "\"";

0 commit comments

Comments
 (0)