Multiline Code Block Formatting

Hello,

When I do multi line code blocks with long lines of code the formatting in the rendered page is messed up, as you can see here:

/*make horizontal menu load on top*/
.container_12 .grid_1, .container_12 .grid_2, .container_12 .grid_3, .container_12 .grid_4, .container_12 .grid_5, .container_12 .grid_6,     .container_12 .grid_7, .container_12 .grid_8, .container_12 .grid_9, .container_12 .grid_10 .container_12 .grid_11 {z-index: 1001;}
.container_12 .grid_12 {z-index: 1000;}
/*format toolbar to allow joomla menu*/
div.toolbar ul li{display: inline; list-style: none;}
div.toolbar a:hover {text-decoration: underline;}

(for some reason it's not quite as bad in this instance as it was in a ticket I replied to a customer with the same code.. it seems that the commas are getting alot of white-space added after when rendered)

How to fix?

Thanks!

  1. Try using the @@@ code to surround the code:

      @@@
      /*make horizontal menu load on top*/
      .container_12 .grid_1, .container_12 .grid_2, .container_12 .grid_3, .container_12 .grid_4, .container_12 .grid_5, .container_12 .grid_6,     .container_12 .grid_7,   .container_12 .grid_8, .container_12 .grid_9, .container_12 .grid_10 .container_12 .grid_11 {z-index: 1001;}
      .container_12 .grid_12 {z-index: 1000;}
    
      /*format toolbar to allow joomla menu*/
      div.toolbar ul li{display: inline; list-style: none;}
      div.toolbar a:hover {text-decoration: underline;}
      @@@
    
  2. Ahh.. will do!

    Thanks!

    TJ Baker
    Team Joomlashack
    www.joomlashack.com

  3. That's some custom syntax we added on top of Markdown so we can
    eventually get code highlighting. You can specify something like this
    to get css highlighting, for example:

    @@@ css

      blah blah

    @@@

    We don't have syntax highlighting yet, but the generated html has a
    css class for whatever you put after the '@@@'.

  4. Sweet .. thanks for the tip, and for being so fast about it too! :)

    cheers,

    TJ Baker
    Team Joomlashack
    www.joomlashack.com

  5. rick closed this discussion on 21 Dec, 2009 08:00 PM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac