I could append this text node if line is not empty. One one hand, this makes the code more complicated (one more if-block), on the other hand, this is cleaner (we don't add empty text nodes). Steve, tell me what you prefer. My preference is to always add it (simpler code is better imo) but up to you :)