If you want to keep with your original approach you must remove the leading of the line numbers ("0" leading for line numbers) and remove also remove the space before from the text lines (0 space before in text lines). I tested the complete procedure and I can confirm that the final result output will look like this:
line # text line text line text line text line text text line text line text line text line text text line text line text line text line text text line text line text line text line text text line text line text line text line text line # text line text line text line text line text text line text line text line text line textas you specified.