Forum Discussion

edhans's avatar
edhans
Icon for Community Champion rankCommunity Champion
6 years ago

Extra line feeds added around code blocks if a post is edited

Extra line feeds get added after normal text and code blocks when you edit a post.

See this post. It did not have all of that white space until I edited it. I've seen this consistently happen when I edit. Would be nice of someone could fix that little glitch.

 

Sometimes I go in and clean that up, but if I edit again, they come back.

7 Replies

  • JCM_iTalent's avatar
    JCM_iTalent
    Icon for Microsoft Employee rankMicrosoft Employee

    Hello edhans,

    Could you provide some more details? Does this happen with typed out text or copied and pasted text? What browser are you using? Detailed steps for when exactly this happens would also be great.

    Thanks in advance.

    • edhans's avatar
      edhans
      Icon for Community Champion rankCommunity Champion

      Hi JCM_iTalent ,

      The normal text is typed. 99% of the time any text in the code box is pasted into the code box, using the </> icon on the toolbar.
      I am using Chromium Edge, currently build 84.0.522.59, but this has been happening at least a month or so.

      It never happens when I create the first message. Everthing looks good.

      But I can submit it, then

      1. Press Edit Post
      2. add 1 word to the end of the post. Never touching anything else.
      3. press submit.

      It automatically adds the line feeds around the code boxes. It will continue to do this until there are 2-3 extra lines, then it seems to stop. I can edit it 5 or 6 times, but it won't go beyond the 2-3 extra line feeds it inserts.

       

      I can delete the line feeds when I edit, but they will come back if I edit again. 

       

      I always see this around code boxes. I sometimes see it around images, but not as often. Rarely even.

      • edhans's avatar
        edhans
        Icon for Community Champion rankCommunity Champion

        I'm going to create a GIF showing this.

         

         

         

         

         

         

         

        This is some awesome code!

         

         

         

         

         

         

         

        forgot something!

        ok JCM_iTalent - here is a GIF showing how this happens (for some reason it might not show up in your browser. Click onthe broken image icon if that happens. It will open in a window and show it. Might be because it is 3MB)- meanwhile all of these edits have added a ton of new line feeds.