• View

  • Edit

  • History

  • Attach

  • Print

Tests about vertical space (vspace)


Vspace?disablevspace=1

Heading

This is a test.

This is a test.

Heading

This is a test.

This is a test.

Heading

This is a test.

This is a test.

Heading

This is a test.

Heading

This is a test.

This is a test.

Information from earlier discussions:

http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/22917/focus=23047

">Why was <p class="vspace"> introduced in PmWiki?

Because HTML is broken. If you put the margins onto the <p> elements themselves, then it becomes very difficult to get lists and other block elements to appear adjacent to paragraphs."

From PITS:00783 "...headings would ignore a blank line that follows, such that a paragraph following a heading doesn't get 'vspace' unless there are at least two blank lines ahead of it. The purpose of this is to allow the vertical space between a heading and its subsequent paragraph to be smaller than the vertical space between paragraphs..."

Test cases

Paragraph 1

Paragraph 2

List "heading"

  • The first list item should have the
  • same vertical distance to the "heading"
  • as following list items to each other

List end

List "heading"

  • The first list item should have the
  • same vertical distance to the "heading"
  • as following list items to each other

List end

Heading

Text directly following a heading

Another heading

one blank line between heading and text

One more heading

two blank lines between heading and text. This produces slightly more vertical space, where is this documented? Is there any real world use of this feature? I consider this somewhat surprising.

Heading following a paragraph directly without a blank line

Heading

  • List directly
  • following a heading

Tests with tables

  • listitem_1
  • listitem_2
  • listitem_3

This paragraph should contain a word wrap so we need some nonsense test here. This paragraph should contain a word wrap so we need some nonsense test here. This paragraph should contain a word wrap so we need some nonsense test here.

  • listitem_4
  • listitem_5
  • listitem_6

forced
line break
in para

  • listitem_7
  • listitem_8
  • listitem_9

Paragraph 1

Paragraph 2

$StopWatch
 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.21 00.20 MarkupToHTML begin
 3: 00.23 00.22 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 4: 00.23 00.22 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 5: 00.26 00.25 MarkupToHTML end
 6: 00.26 00.25 MarkupToHTML begin
 7: 00.26 00.25 MarkupToHTML end
 8: 00.27 00.26 MarkupToHTML begin
 9: 00.28 00.27 MarkupToHTML end
10: 00.28 00.27 MarkupToHTML begin
11: 00.29 00.28 MarkupToHTML end
12: 00.29 00.28 MarkupToHTML begin
13: 00.29 00.28 MarkupToHTML end
14: 00.29 00.28 MarkupToHTML begin
15: 00.29 00.28 MarkupToHTML end
16: 00.29 00.28 now
Peak memory: 3,757,096 bytes