05-15-2011, 09:48 AM | #1 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Blank line in code
I've noticed that whenever I use the [code] tag, a blank line (or some blank space, at least) gets added to the end of it. For instance, if I write this:
[code]Test[/code] I get this: Code:
Test I wonder if this blank line comes from some internal coding or styling, and if so, can it be removed? |
05-15-2011, 09:56 AM | #2 |
Chocolate Grasshopper ...
Posts: 27,600
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
said a 'green one' to the other 'green ones' .....
|
Advert | |
|
05-15-2011, 02:17 PM | #3 |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
This happens with me quite often that when I want to have a blank line in a post or in a PM that the system adds further line(s).
What helps is click "Preview Post", delete all the additional lines and only then click "Submit Reply". |
05-15-2011, 04:28 PM | #4 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Code:
This is a test which didn't pass. |
05-15-2011, 07:50 PM | #5 | |
sleepless reader
Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Quote:
What's bad about discussing such things in public? Last edited by netseeker; 05-15-2011 at 07:54 PM. |
|
Advert | |
|
05-16-2011, 04:02 AM | #6 |
Chocolate Grasshopper ...
Posts: 27,600
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
|
05-16-2011, 07:44 AM | #7 |
Fully Converged
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Testing (please ignore):
Code:
<?php /** * WordPress Cron Implementation for hosts, which do not offer CRON or for which * the user has not setup a CRON job pointing to this file. * * The HTTP request to this file will not slow down the visitor who happens to * visit when the cron job is needed to run. * * @package WordPress */ ignore_user_abort(true); if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') ) die(); /** * Tell WordPress we are doing the CRON task. * * @var bool */ define('DOING_CRON', true); if ( !defined('ABSPATH') ) { /** Setup WordPress environment */ require_once('./wp-load.php'); } if ( false === $crons = _get_cron_array() ) die(); $keys = array_keys( $crons ); $local_time = time(); if ( isset($keys[0]) && $keys[0] > $local_time ) die(); foreach ($crons as $timestamp => $cronhooks) { if ( $timestamp > $local_time ) break; foreach ($cronhooks as $hook => $keys) { foreach ($keys as $k => $v) { $schedule = $v['schedule']; if ($schedule != false) { $new_args = array($timestamp, $schedule, $hook, $v['args']); call_user_func_array('wp_reschedule_event', $new_args); } wp_unschedule_event($timestamp, $hook, $v['args']); do_action_ref_array($hook, $v['args']); } } } die(); |
05-16-2011, 07:58 AM | #8 |
Fully Converged
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Fixed I believe.
It was related to some code that calculated the pixel height of the resulting code block. For some reason it always added 18 pixels to the total (i.e. the blank line at the end was meant to be a feature). |
05-16-2011, 08:21 AM | #9 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Code:
Thank you! |
05-16-2011, 08:48 AM | #10 |
Chocolate Grasshopper ...
Posts: 27,600
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
|
05-16-2011, 10:45 AM | #11 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
And this?
Code:
“<img class="spacer" src="empty.png" alt="">‘Because,’<img class="spacer" src="empty.png" alt="">” he read. Last edited by Jellby; 05-16-2011 at 10:48 AM. |
05-16-2011, 02:14 PM | #12 |
Booklegger
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
|
That's probably what the 18 pixels were for - whether they were needed or not!
@Jelby - Don't you know that long lines of code violate the "Coding Standard"? We are trying to help you comply... Last edited by pholy; 05-16-2011 at 02:17 PM. Reason: Added snarky comment for Jelby... |
05-16-2011, 08:40 PM | #13 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
So basically, the fix breaks things. Time to remove the fix.
|
05-18-2011, 06:06 AM | #14 |
Fully Converged
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
We reverted the code, so the initial issue (one blank line at the end of the code) is present again. I guess the easiest is to live with that blank line until we decide to make a major upgrade to the forum software. |
05-18-2011, 10:23 AM | #15 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Any word on proper quoting? Are we ever going to get it? I noticed in another forum I belong to that uses the same software, that you can only quote 3 or 4 levels. I think that works very well without making quotes a mess.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Let's create a source code repository for DR 800 related code? | jraf | iRex | 3 | 03-11-2010 12:26 PM |
get rid of blank line html code | Blurr | Calibre | 4 | 12-28-2009 09:20 PM |
Sigil 1.6 - deleting blank line very slow | lol | Sigil | 2 | 12-24-2009 11:54 AM |
Random differences in blank line conversion in ePub | HarryT | Calibre | 14 | 08-13-2009 03:31 AM |
Blank pages | JSWolf | Calibre | 4 | 11-29-2008 01:22 PM |