Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6347099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:08:41+00:00 2026-05-24T21:08:41+00:00

I use syntaxhighlighter on my blog to format C++ code. Since last few days

  • 0

I use syntaxhighlighter on my blog to format C++ code. Since last few days I am getting extra blank line after each line after each line of code. Please see this link for more info.

Following is the code I wrote there. I am not seeing any line break in that.

//Define MAX 1 less so that adding 1 doesn't make it 0
#define MAX 0xFFFFFFFE;

unsigned int jump(int *array, int n)
{
    unsigned int *result = new unsigned int[n];
    int i, j;

    //Boundry conditions
    if (n == 0 || array[0] == 0)
        return MAX;

     result[0] = 0;  //no need to jump at first element
     for (i = 1; i < n; i++)
     {
           result[i] = MAX; //Initialization of result[i]
           for (j = 0; j < i; j++)
           {
                 //check if jump is possible from j to is
                 if (array[j] >= (i-j))
                 {
                       //check if better solution available
                       if ((result[j] + 1) < result[i])
                             result[i] = result[j] + 1;  //updating result[i]
                 }
           }
     }

     //return result[n-1]
     unsigned int answer = result[n-1];
     delete[] result;

     return answer;
}

Surprisingly this is happening only for new posts, all old posts are shown currently w/o extra blank lines.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:08:42+00:00Added an answer on May 24, 2026 at 9:08 pm

    Your source code (before JavaScript) basically looks like this:

    <pre>
    First line
    <br />Another line
    <br />Last line
    </pre>
    

    If you are using a <pre> tag, you don’t need to insert <br /> tags to force line feeds but, if you do, they should replace the original line feed.

    Update: I’ll make a blind guess with the little information we have. Your code is saved into a local file using Windows line feeds (CR+LF). The server runs Linux and applies a function that replaces Linux line feeds (LF). with <br /> tags so you end up with CR<br />. This is inserted into a <pre> tag so the browser converts this to two consecutive line feeds.

    My hypothesis seems likely because, if you save the HTML source code into a file and open it with a text editor that can display line feeds, it’ll show the file is using Linux style (LF) everywhere expect in the code snippet, where it’s using CR (old MacOS 9 style).

    enter image description here

    Workaround: save the file as Unix before copying or copy with another editor or copy to another browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SyntaxHighlighter for blogger to format the code snippet I use in my
On a page in our web app we use SyntaxHighlighter to highlight source code.
I'm trying to use SyntaxHighlighter 3.0.83 on Blogger in order to highlight some simple
Can anyone recommend how to install and use wordpress.org GeSHi syntaxhighlighter? I'm looking for
Use case example: Client A comes to request sales information, enters their zip code
I'm trying to use Syntax Highlighter with my blog at http://a.shinynew.me . This is
As is asked and answered in this post , one can use SyntaxHighlighter for
use grep command to find txt files containing telephone number. telephone number format could
I use the Javascript Syntax Highlighter built by Alex Gorbatchev https://github.com/alexgorbatchev/SyntaxHighlighter/ I am trying
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.