locked
Pasting PRE code into VSComm2015, removes extra carriage returns RRS feed

  • Question

  • User-1134314964 posted

    Hello..

    When I paste PRE code into visual studio, it's removing my extra line feeds; there 470 total lines.

    I have to go through and add the appropriate carriage returns to return the code to what it should be.

    Where in the configuration is a way for me to turn off this "fix"?

    Thanks..

    Original Code:

    </pre>
    PARAGRAPH 1 INFO LINE 1
    PARAGRAPH 1 INFO LINE 2
    PARAGRAPH 1 INFO LINE 3
    
    PARAGRAPH 2 INFO LINE 1
    PARAGRAPH 2 INFO LINE 2
    PARAGRAPH 2 INFO LINE 3
    
    PARAGRAPH 3 INFO LINE 1
    PARAGRAPH 3 INFO LINE 2
    PARAGRAPH 3 INFO LINE 3
    </pre>

    Pasted Code:

    </pre>
    PARAGRAPH 1 INFO LINE 1
    PARAGRAPH 1 INFO LINE 2
    PARAGRAPH 1 INFO LINE 3
    PARAGRAPH 2 INFO LINE 1
    PARAGRAPH 2 INFO LINE 2
    PARAGRAPH 2 INFO LINE 3
    PARAGRAPH 3 INFO LINE 1
    PARAGRAPH 3 INFO LINE 2
    PARAGRAPH 3 INFO LINE 3
    </pre>



    Tuesday, February 23, 2016 5:37 PM

Answers

  • User-166373564 posted

    Hi spook_man,

    Based on the code, you use the tag </pre></pre>, I have tried using the tag <pre></pre>, it works fine on my side.

    <pre>

    PARAGRAPH 1 INFO LINE 1

    PARAGRAPH 1 INFO LINE 2

    PARAGRAPH 1 INFO LINE 3

    PARAGRAPH 2 INFO LINE 1

    PARAGRAPH 2 INFO LINE 2

    PARAGRAPH 2 INFO LINE 3

    PARAGRAPH 3 INFO LINE 1

    PARAGRAPH 3 INFO LINE 2

    PARAGRAPH 3 INFO LINE 3

    </pre>

    /*insert image*/

    http://i65.tinypic.com/negnsh.png

    Best Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 2, 2016 7:14 AM
  • User-1134314964 posted

    As before, found that when pasting the code in, VS2015 removes the extra carriage returns.

    But hitting CTRL-Z (undo) once (twice removes the pasted code completely), puts them back in and the text is formatted as it should be.  The document can then be saved and the information is displayed properly.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 8, 2016 7:47 PM

All replies

  • User-1134314964 posted

    I've even tried pasting the code (without the pre tags) into VS and it's fine.  The instant I encase the code in pre tags, the extra carriage return lines are removed.

    Tuesday, February 23, 2016 5:40 PM
  • User-166373564 posted

    Hi spook_man,

    Based on the code, you use the tag </pre></pre>, I have tried using the tag <pre></pre>, it works fine on my side.

    <pre>

    PARAGRAPH 1 INFO LINE 1

    PARAGRAPH 1 INFO LINE 2

    PARAGRAPH 1 INFO LINE 3

    PARAGRAPH 2 INFO LINE 1

    PARAGRAPH 2 INFO LINE 2

    PARAGRAPH 2 INFO LINE 3

    PARAGRAPH 3 INFO LINE 1

    PARAGRAPH 3 INFO LINE 2

    PARAGRAPH 3 INFO LINE 3

    </pre>

    /*insert image*/

    http://i65.tinypic.com/negnsh.png

    Best Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 2, 2016 7:14 AM
  • User-1134314964 posted

    As before, found that when pasting the code in, VS2015 removes the extra carriage returns.

    But hitting CTRL-Z (undo) once (twice removes the pasted code completely), puts them back in and the text is formatted as it should be.  The document can then be saved and the information is displayed properly.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 8, 2016 7:47 PM