adding generated code to code div
line counting and line breaks