part of
http://bugs.splitbrain.org/?do=details&id=1014
"\" necessity off for paragraphs by option switch, thus paragraphs remain as in the source text without them joining. (some Wiki texts would have to be also adapted then, Plugin is not good for this function)
\inc\parser\handler.php
function process($calls) {
global $conf; //+++
foreach ( $calls as $key => $call ) {
$cname = $call[0];
if($cname == 'plugin') {
$cname='plugin_'.$call[1][0];
$plugin = true;
$plugin_open = (($call[1][2] == DOKU_LEXER_ENTER) || ($call[1][2] == DOKU_LEXER_SPECIAL));
$plugin_close = (($call[1][2] == DOKU_LEXER_EXIT) || ($call[1][2] == DOKU_LEXER_SPECIAL));
} else {
$plugin = false;
}
// Process blocks which are stack like... (contain linefeeds)
if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) {
$this->calls[] = $call;
// Hack - footnotes shouldn't immediately contain a p_open
if ( $cname != 'footnote_open' ) {
$this->addToStack();
} else {
$this->addToStack(FALSE);
}
continue;
}
if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) {
if ( $this->inParagraph ) {
$this->closeParagraph($call[2]);
}
$this->calls[] = $call;
$this->removeFromStack();
continue;
}
if ( !$this->atStart ) {
if ( $cname == 'eol' ) {
// Check this isn't an eol instruction to skip...
if ( $this->skipEolKey != $key ) {
// Look to see if the next instruction is an EOL
if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) {
if ( $this->inParagraph ) {
//$this->calls[] = array('p_close',array(), $call[2]);
$this->closeParagraph($call[2]);
}
$this->calls[] = array('p_open',array(), $call[2]);
$this->inParagraph = TRUE;
// Mark the next instruction for skipping
$this->skipEolKey = $key+1;
}else{
//if this is just a single eol make a space from it
//+++ $this->calls[] = array('cdata',array(" "), $call[2]);
//+++
if($conf['activparagraph']){ // +++ Neu
if ( isset($calls[$key-1]) && $calls[$key-1][0] != 'linebreak' && $calls[$key-1][0] != 'eol' ) {
$this->calls[] = array('linebreak',array(), $call[2]);
}else{
$this->calls[] = array('cdata',array(" "), $call[2]);
}
}else{ // +++ Original
$this->calls[] = array('cdata',array(" "), $call[2]);
} // +++