program-generated eaf and unwanted line break in annotation

Hi. As the title suggests, I have a program that generates .eaf files from a .wav and .txt. You can see it here (https://github.com/BobBorges/Short-wav_to_elan/blob/master/elanize.sh). Sometimes the text input gets an unwanted line break + 8 spaces, and I can’t figure out why. For example, my text file has:

szkòlnô mòje córczi wcyg sã na niã skarżi

but when I run my program and open the .eaf file, the contents of the annotation is

szkòlnô mòje córczi wcyg sã na niã
        skarżi

Both input txt and resulting eaf are utf-8 unicode text encoded. This phenomenon doesn’t happen in every instance of creating an eaf file. It seems non random in that the break is usually (always?) before the last word, but it doesn’t seem to be tied to any particular characters either.

I know this is probably an atypical issue, but any ideas about how to eliminate this line break and extra spaces would be appreciated.

Hi, it seems like you could post-process the files with File->Multiple File Processing->Scrub Transcriptions… to remove line break and sequences of white spaces?

-Han