Retain formatting after hitting enter

Issue #52