Skip to content

Commit

Permalink
attempted fix for #49. Uses new select_set() function
Browse files Browse the repository at this point in the history
  • Loading branch information
kosloot committed Oct 7, 2022
1 parent bd43a98 commit 46f8f31
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/folia_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2298,9 +2298,17 @@ namespace folia {
cerr << "no space? s: " << s << endl;
}
if ( s ){
vector<Word*> words = s->select<Word>(false);
if ( !words.empty() ){
Word *last = words.back();
set<ElementType> wanted = {Word_t,Correction_t};
set<ElementType> excl;
vector<FoliaElement*> elts = s->select_set( wanted,
"",
excl,
SELECT_FLAGS::LOCAL );
if ( !elts.empty() ){
if ( debug ){
cerr << "found some mixed stuff: " << elts << endl;
}
FoliaElement *last = elts.back();
if ( debug ){
cerr << "no space? last: " << last << endl;
}
Expand Down

0 comments on commit 46f8f31

Please sign in to comment.