You are here

Posting code with: code and pre

8 posts / 0 new
Last post
John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 57 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Posting code with: code and pre

As Thox helpfully pointed out, it appears I originally had the code html tag set to display block and I had disabled pre (which should be used for long blocks of code). I've corrected the issue in the CSS and a couple posts. But if you have a post that you used code to display a block of code, you'll need to update it to pre. If there are other posts that need updating, post a link here and I'll fix em.

As an example... here's some code inline using the code tag so it sits mid-sentence. And here's a:

pre example
with different stuff on each line
20 goto 10

This should make posting code snippets a bit easier.

Rob Loach
Rob Loach's picture
Offline
Last seen: 15 years 7 months ago
Developer
Joined: 2005-12-09 17:29
Geshi Drupal Filter

The Geshi Filter for Drupal might interest you. Might be a little more then what PortableApps need, but it definately is more powerful (Geshi is an amazing code highlighter).

Rob Loach [Website] [Projects]

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 57 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
For now

I don't think we need it. But that is pretty cool indeed. And we'll have to bookmark that for the future. If it could be applied to forum posts only, that would be even better... except when a search engine is hammering the server (which is why forums are currently excluded in robots.txt... a carryover from the old overloaded server).

Sometimes, the impossible can become possible, if you're awesome!

Thox
Offline
Last seen: 17 years 8 months ago
Joined: 2006-02-09 06:46
robots.txt and Drupal URLs

Disallow: /forums - that won't stop google indexing the forums, just the forum front page.

Thox
Offline
Last seen: 17 years 8 months ago
Joined: 2006-02-09 06:46
Thanks

Cheers John. Here's a quick test of a multiline pre tag with blank lines (for Drupal's sake). I know the previous code handling broke with something like this:

first line
second line

fourth line

UPDATE - Good news, all fixed Smile

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 6 months ago
Joined: 2006-01-06 21:27
Needs fixing:

"If you're not part of the solution, you're part of the precipitate."

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 57 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
All set

All set

Sometimes, the impossible can become possible, if you're awesome!

Rob Loach
Rob Loach's picture
Offline
Last seen: 15 years 7 months ago
Developer
Joined: 2005-12-09 17:29
A bit too late...

John got to them before I could Blum .

Rob Loach [Website] [Projects]

Topic locked