Commit 9cb62e96 authored by twanvl's avatar twanvl

fixed bug in keyword parsing: seperator_after contained the whole string,...

fixed bug in keyword parsing: seperator_after contained the whole string, causing it to be duplicated
parent a604192c
...@@ -600,7 +600,7 @@ bool KeywordDatabase::tryExpand(const Keyword& kw, ...@@ -600,7 +600,7 @@ bool KeywordDatabase::tryExpand(const Keyword& kw,
if (!kwp.separator_after_re.empty() && kwp.separator_after_re.matches(sep_match, param)) { if (!kwp.separator_after_re.empty() && kwp.separator_after_re.matches(sep_match, param)) {
size_t sep_start = sep_match.position(); size_t sep_start = sep_match.position();
assert(sep_match[0].second == param.end()); // should only match at end of param assert(sep_match[0].second == param.end()); // should only match at end of param
separator_after.assign(param, sep_start); separator_after.assign(param, sep_start, String::npos);
param.resize(sep_start); param.resize(sep_start);
// strip from tagged version // strip from tagged version
size_t sep_start_t = untagged_to_index(part, sep_start, false); size_t sep_start_t = untagged_to_index(part, sep_start, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment