When I use the D7 syntaxhighlighter module and the script and embed code in the {} macro bracket, I get all code scattered over a gazillion lines. It's almost every word or operator on its own line. See the attached screen dump where you also see the node being edited in a normal textarea.

I have tried to rule out all other factors.
- I have a text format that uses only one filter, the syntax highlighter
- that format uses no editor, but works with plain text
- I only have code in the node

All this to no avail. The result is the same as when I use the highlighter in a node with normal text, pictures, CKeditor and whatnot: A tall column of nicely colored code, but nothing really useful.

What might be the reason for this?

Martin

CommentFileSizeAuthor
highlighter.png31.41 KBvertikal.dk

Comments

mattyoung’s picture

Not sure why it does this. By any chance you change the tag from pre to something else? Eventhough the js lib allows setting the tag, I found that only pre works. Using something like code give something like you are getting. Other than this, I can't think of anything. You might want to try the syntaxhighlighter js lib forum at their site.

vertikal.dk’s picture

@mattyoung,

The pre tag has been the same all the time, and has not been changed, so that's probably not the reason.
And the forum for syntaxhighlighter has been closed because of spam, so that's a dead end too for now.

I'll dig on in my own installation and see if I can find the cause somewhere.

Martin

vertikal.dk’s picture

Title: Too many darn line breaks! » Stupid me!
Status: Active » Fixed

Duh!

Sometimes the faults are so obvious and dumb that you simply overlook them. In order to get my code block nicely styled, I added a border and a display : block to get a nice frame.

But... every single source code element is packed in a code tag, and that was then displayed as a block. Awwww!

Edit some css, and viola! Everything id now dandy.

Stupid me!

Martin

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Title: Stupid me! » Too many darn line breaks
Issue summary: View changes