Loading...
 
Skip to main content

Formatting of empty Lines in Wiki-Pages is not handled properly

Status
Closed
Subject
Formatting of empty Lines in Wiki-Pages is not handled properly
Version
6.x
7.x
Category
  • Error
  • Usability
  • Patch
  • Consistency
Feature
Article
Wiki Syntax (text area, parser, external wiki, etc)
Submitted by
bubi
Lastmod by
bubi
Rating
(0)
Description

A blank line out of a paragraph should not start a new paragraph (as in 4.2). If feature_wiki_paragraph_formatting_add_br is on, an empty line is created on top of the new paragraph.
It comes from lib/tikilib.php line 6838ff
} elseif (!$in_paragraph && !$contains_block) {
// If not in paragraph, first non-blank line; start a paragraph; if not start of div created by plugins

$data .= "<p>";

...

in the comment it is stated that the paragraph should only begin at first NON-BLANK line

Solution

I have been able to correct it by changing it to:

} elseif (!$in_paragraph && !$contains_block /* bubi: first non-blank line starts a para */ && !empty($tline)) {
// If not in paragraph, first non-blank line; start a paragraph; if not start of div created by plugins

$data .= "<p>";



This appears to be solved by r34436 for Tiki 8. Chealer

Importance
7
Priority
35
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3874
Created
Monday 09 May, 2011 09:11:06 UTC
by bubi
LastModif
Tuesday 11 October, 2011 23:33:14 UTC


Show PHP error messages