Thanks for the additional commit and test case! This looks great, and is much more robust than assuming the indentation was either 9 or 10 (certainly no reason the numbers had to be that small).
I suppose it is possible that you only need to determine the initial indentation once rather than on each line? I have never seen a genbank file with different indentations (though have not seen all that many). Probably best to go with the safe solution unless we know otherwise though.
Thanks for the additional commit and test case! This looks great, and is much more robust than assuming the indentation was either 9 or 10 (certainly no reason the numbers had to be that small).
I suppose it is possible that you only need to determine the initial indentation once rather than on each line? I have never seen a genbank file with different indentations (though have not seen all that many). Probably best to go with the safe solution unless we know otherwise though.
Thanks again!