SqlCode does not contain linebreaks

MateFarkasMateFarkas Posts: 4
edited September 15, 2015 10:00AM in SQL Doc
Hi RedGate!

In SQL Doc2 when I copy an sql script from the generated help file and paste it to a query window in SSMS then it was the same as in the help file.
Now the line breaks are disappeared so if I paste the code from clipboard then the sql code will be pasted in one line (wtihout line breaks).
How can I solve this?
Thanks.

Comments

  • Hi,

    What documentation format are you generating? Could you provide an example of some generated documentation that does this?
    Software Engineer
    Redgate Software
  • Hi,
    This is a CHF help file. You don't experience this issue?
    Just generate a simple CHF help file from any database with sql scripts and then open the CHF (Help Viewer) and try to copy the sql script.

    Regards,
    Mate
  • MateFarkas wrote:
    This is a CHF help file. You don't experience this issue?
    Just generate a simple CHF help file from any database with sql scripts and then open the CHF (Help Viewer) and try to copy the sql script.

    Hi Mate,

    Thanks for the information. Unfortunately this is a bug in SQL Doc, with reference SDOC-1631. I'll let you know when I hear any news about a possible bugfix.

    Apologies.
    Software Engineer
    Redgate Software
  • Hi,
    Thanks for the answer and the accepted bug ticket.
    Meanwhile I found a solution. I copied the #sqlScript css class from the old SqlDoc2 and replaced the new.
    So I changed the Master.css in the Style1 folder from this:
    #sqlScript {
    	font-family: Consolas, Monaco, Menlo, "Courier New", monospace;
    	overflow-x: auto;
    	white-space: pre;
    }
    

    to this:
    #sqlScript {
    	font-family: Consolas, Monaco, Menlo, "Courier New", monospace;
    	text-wrap: normal;
    	word-wrap: break-word;
    }
    

    And this solved.
  • Hi Mate,

    It's great to hear that you got everything working! Thanks for the details of the changes you made - hopefully we'll be able to implement a fix in a future release.
    Software Engineer
    Redgate Software
Sign In or Register to comment.