Generalize the realText algorithm
Remove unnecessary blank line