Index: branches/apertium-separable/src/lsx_FSTProcessor.cc =================================================================== --- branches/apertium-separable/src/lsx_FSTProcessor.cc (revision 81202) +++ branches/apertium-separable/src/lsx_FSTProcessor.cc (revision 81204) @@ -1328,16 +1328,33 @@ out.erase(i-1, 1); } } + if(out[out.length()-1] == L'^') + { out = out.substr(0, out.length()-1); // extra ^ at the end + } + else + { + for(int i=out.length()-1; i>=0; i--) + { + if(out[i] == L'$') + { + out.insert(i+1, L" "); + break; + } + } + out += L'$'; + } if(blankqueue.size() > 0) { fputws(blankqueue.front().c_str(), output); blankqueue.pop(); } - for(int i=0; i < (int) out.size(); i++) + for(int i=0; i < (int) out.length(); i++) { + /* the problem with ^out of$ is that the space doesn't get processed as a blank, so blankqueue is empty */ if((out[i] == L'$' || out[i] == L'#') && blankqueue.size() > 0) { + // out.insert(i+1, L"*"); out.insert(i+1, blankqueue.front().c_str()); blankqueue.pop(); }