From 9be9bccfcfc2c46459b3da963bc59a37f841fe8a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 15 Jul 2010 19:01:00 -0700 Subject: Added --section-divs option. + Header identifiers now get attached to the headers, unless --section-divs is specified, in which case they are added to enclosing divs. By default, the divs are not added. + Resolves Issue #230, #239. --- tests/s5.fragment.html | 34 +- tests/s5.inserts.html | 34 +- tests/writer.html | 1984 +++++++++++++++++++++++------------------------- 3 files changed, 991 insertions(+), 1061 deletions(-) (limited to 'tests') diff --git a/tests/s5.fragment.html b/tests/s5.fragment.html index 32346a331..9845e1409 100644 --- a/tests/s5.fragment.html +++ b/tests/s5.fragment.html @@ -1,21 +1,17 @@ -

First slide

Math

second bullet

Math

diff --git a/tests/s5.inserts.html b/tests/s5.inserts.html index 69ab6f5e1..f909850d8 100644 --- a/tests/s5.inserts.html +++ b/tests/s5.inserts.html @@ -13,26 +13,22 @@ STUFF INSERTED

My S5 Document

-

First slide

Math

second bullet

Math

STUFF INSERTED diff --git a/tests/writer.html b/tests/writer.html index adf0bb9ca..72c93ee71 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -13,119 +13,96 @@

This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.


Headers

Level 1

Level 2 with emphasis

Level 3

with no blank line

Level 2

with no blank line


Paragraphs

Here’s a regular paragraph.

In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

Here’s one with a bullet. * criminey.

Headers

Level 3 with emphasis

Level 4

Level 5

Level 1

Level 2 with emphasis

Level 3

with no blank line

Level 2

with no blank line


Paragraphs

Here’s a regular paragraph.

In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

Here’s one with a bullet. * criminey.

There should be a hard line break
here.


Block Quotes

E-mail style:

This is a block quote. It is pretty short.

Code in a block quote:

sub status {
+    print "working";
+}
+

There should be a hard line break
here.


Block Quotes

A list:

  1. item one
  2. item two

E-mail style:

Nested block quotes:

This is a block quote. It is pretty short.

nested

Code in a block quote:

sub status {
-    print "working";
-}
-

A list:

  1. item one
  2. item two

Nested block quotes:

nested

nested

nested

This should not be a block quote: 2 > 1.

And a following paragraph.


Code Blocks

Code:

---- (should be four hyphens)
+  >

This should not be a block quote: 2 > 1.

And a following paragraph.


Code Blocks

Code:

---- (should be four hyphens)
 
 sub status {
     print "working";
@@ -133,540 +110,524 @@ sub status {
 
 this code block is indented by one tab
 

And:

    this code block is indented by two tabs
+  >

And:

    this code block is indented by two tabs
 
 These should not be escaped:  \$ \\ \> \[ \{
 

Lists

Unordered

Asterisks tight:

  • asterisk 1
  • asterisk 2
  • asterisk 3

Lists

Unordered

Asterisks tight:

  • asterisk 1
  • asterisk 2
  • asterisk 3

Asterisks loose:

  • asterisk 1

  • asterisk 2

  • asterisk 3

Pluses tight:

  • Plus 1
  • Plus 2
  • Plus 3

Pluses loose:

  • Plus 1

  • Plus 2

  • Plus 3

Minuses tight:

  • Minus 1
  • Minus 2
  • Minus 3

Minuses loose:

  • Minus 1

  • Minus 2

  • Minus 3

Ordered

Tight:

  1. First
  2. Second
  3. Third

and:

  1. One
  2. Two
  3. Three

Loose using tabs:

  1. First

  2. Second

  3. Third

and using spaces:

  1. One

  2. Two

  3. Three

Multiple paragraphs:

  1. Item 1, graf one.

    Asterisks loose:

      Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

    • Item 2.

    • Item 3.

Nested

  • Tab
    • asterisk 1

    • asterisk 2

    • asterisk 3

      Tab
      • Tab

    Pluses tight:

    • Plus 1
    • Plus 2
    • Plus 3

    Pluses loose:

      Here’s another:

      1. First
      2. Second:
        • Plus 1

        • Fee
        • Plus 2

        • Fie
        • Plus 3

        • Foe

        Minuses tight:

      3. Third

      Same thing but with paragraphs:

      1. First

      2. Second:

        • Minus 1
        • Fee
        • Minus 2
        • Fie
        • Minus 3
        • Foe

        Minuses loose:

      3. Third

      Tabs and spaces

      • this is a list item indented with tabs

      • this is a list item indented with spaces

        • Minus 1

        • Minus 2

          this is an example list item indented with tabs

        • Minus 3

          this is an example list item indented with spaces

    Ordered

    Tight:

    1. First
    2. Second
    3. Third

    and:

    1. One
    2. Two
    3. Three

    Loose using tabs:

    1. First

    2. Second

    3. Third

    and using spaces:

    1. One

    2. Two

    3. Three

    Multiple paragraphs:

    1. Item 1, graf one.

      Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

    2. Item 2.

    3. Item 3.

    Nested

    • Tab
      • Tab
        • Tab

    Here’s another:

    1. First
    2. Second:
      • Fee
      • Fie
      • Foe
    3. Third

    Fancy list markers

    1. begins with 2
    2. and now 3

      Same thing but with paragraphs:

      1. First

      2. Second:

        • Fee
        • Fie
        • Foe
      3. Third

    Tabs and spaces

    • this is a list item indented with tabs

    • this is a list item indented with spaces

      • this is an example list item indented with tabs

      • this is an example list item indented with spaces

    Fancy list markers

      with a continuation

      1. begins with 2
      2. sublist with roman numerals, starting with 4
      3. and now 3

        with a continuation

          more items
          1. sublist with roman numerals, starting with 4
          2. a subsublist
          3. more items
            1. a subsublist
            2. a subsublist
          4. a subsublist

        Nesting:

          Nesting:

          1. Upper Alpha
            1. Upper Alpha
                Upper Roman.
                1. Upper Roman.
                    Decimal start with 6
                    1. Decimal start with 6
                      1. Lower alpha with paren
                    2. Lower alpha with paren

                Autonumbering:

                  Autonumbering:

                  1. Autonumber.
                  2. More.
                    1. Autonumber.
                    2. More.
                      1. Nested.
                    3. Nested.

                    Should not be a list item:

                    M.A. 2007

                    B. Williams


        Definition Lists

        Tight using spaces:

        Should not be a list item:

        M.A. 2007

        B. Williams


        Definition Lists

        Tight using spaces:

        apple
        red fruit
        apple
        red fruit
        orange
        orange fruit
        banana
        yellow fruit

        Tight using tabs:

        orange
        orange fruit
        apple
        red fruit
        orange
        orange fruit
        banana
        yellow fruit

        Loose:

        banana
        yellow fruit

        Tight using tabs:

        apple
        red fruit
        apple

        red fruit

        orange

        orange fruit

        banana

        yellow fruit

        Multiple blocks with italics:

        orange
        orange fruit
        apple

        red fruit

        contains seeds, crisp, pleasant to taste

        orange

        orange fruit

        { orange code block }
        -

        orange block quote

        Multiple definitions, tight:

        banana
        yellow fruit

        Loose:

        apple

        red fruit

        apple
        red fruit
        computer
        orange
        orange fruit
        bank
        orange

        Multiple definitions, loose:

        orange fruit

        apple

        red fruit

        computer

        orange

        orange fruit

        bank

        Blank line after term, indented marker, alternate markers:

        banana

        yellow fruit

        Multiple blocks with italics:

        apple

        red fruit

        contains seeds, crisp, pleasant to taste

        apple

        red fruit

        computer

        orange
        orange

        orange fruit

        { orange code block }
        +

        orange fruit

        1. sublist
        2. sublist

        HTML Blocks

        orange block quote

        Multiple definitions, tight:

        apple
        red fruit
        computer
        orange
        orange fruit
        bank

        Multiple definitions, loose:

        apple

        red fruit

        computer

        orange

        orange fruit

        bank

        Blank line after term, indented marker, alternate markers:

        apple

        red fruit

        computer

        orange

        Simple block on one line:

        foo
        + >orange fruit

        1. sublist
        2. sublist

        HTML Blocks

        Simple block on one line:

        foo

        And nested without indentation:

        +>And nested without indentation:

        foo
        bar

        Interpreted markdown in a table:

        +>Interpreted markdown in a table:

        +>emphasized +>strong
        This is emphasized And this is strong

        Here’s a simple block:

        +>Here’s a simple block:

        foo

        This should be a code block, though:

        <div>
        +>This should be a code block, though:

        <div>
             foo
         </div>
         

        As should this:

        <div>foo</div>
        +  >

        As should this:

        <div>foo</div>
         

        Now, nested:

        + >

        Now, nested:

        foo

        This should just be an HTML comment:

        +>This should just be an HTML comment:

        Multiline:

        @@ -675,25 +636,25 @@ Blah This is another comment. -->

        Code block:

        <!-- Comment -->
        +>Code block:

        <!-- Comment -->
         

        Just plain comment, with trailing spaces on the line:

        + >

        Just plain comment, with trailing spaces on the line:

        Code:

        <hr />
        +>Code:

        <hr />
         

        Hr’s:


        + >

        Hr’s:



        @@ -711,477 +672,454 @@ Blah

        Inline Markup

        Inline Markup

        This is emphasized, and so is this.

        This is strong, and so is this.

        An emphasized link.

        This is strong and em.

        So is this word.

        This is strong and em.

        So is this word.

        This is code: >, $, \, \$, <html>.

        This is emphasized, and so is this.

        This is strong, and so is this.

        An emphasized link.

        This is strong and em.

        So is this word.

        strikeout.

        Superscripts: abcd ahello ahello there.

        Subscripts: H2O, H23O, Hmany of themO.

        These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.


        Smart quotes, ellipses, dashes

        “Hello,” said the spider. “‘Shelob’ is my name.”

        ‘A’, ‘B’, and ‘C’ are letters.

        ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’

        ‘He said, “I want to go.”’ Were you alive in the 70’s?

        Here is some quoted ‘code’ and a “quoted link”.

        Some dashes: one—two — three—four — five.

        Dashes between numbers: 5–7, 255–66, 1987–1999.

        Ellipses…and…and….


        LaTeX

        • 2 + 2 = 4
        • This is strong and em.

          So is x ∈ y

        • α ∧ ω
        • 223
        • this word.

          This is code: >, p-Tree

        • Here’s some display math:
          $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
        • Here’s one that has a line break in it: α + ω × x2.

        These shouldn’t be math:

        • To get the famous equation, write $e = mc^2$.
        • $22,000 is a lot of money. So is $34,000. (It worked if “lot” is emphasized.)
        • Shoes ($20) and socks ($5).
        • Escaped $, \, \$, <html>.

          This is strikeout.

          Superscripts: abcd ahello ahello there.

          Subscripts: H2O, H23O, Hmany of themO.

          These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.


        Smart quotes, ellipses, dashes

        “Hello,” said the spider. “‘Shelob’ is my name.”

        ‘A’, ‘B’, and ‘C’ are letters.

        ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’

        ‘He said, “I want to go.”’ Were you alive in the 70’s?

        Here is some quoted ‘code’ and a “quoted link”.

        Some dashes: one—two — three—four — five.

        Dashes between numbers: 5–7, 255–66, 1987–1999.

        Ellipses…and…and….


        LaTeX

          : $73 this should be emphasized 23$.

        Here’s a LaTeX table:


        Special Characters

        Here is some unicode:

        • I hat: Î
        • 2 + 2 = 4
        • x ∈ y
        • α ∧ ω
        • 223
        • p-Tree
        • Here’s some display math:
          $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
        • Here’s one that has a line break in it: α + ω × x2.

        These shouldn’t be math:

          o umlaut: ö
        • To get the famous equation, write $e = mc^2$.
        • $22,000 is a lot of money. So is $34,000. (It worked if “lot” is emphasized.)
        • Shoes ($20) and socks ($5).
        • Escaped $: $73 this should be emphasized 23$.

        Here’s a LaTeX table:


        Special Characters

        Here is some unicode:

          section: §
        • I hat: Î
        • o umlaut: ö
        • section: §
        • set membership: ∈
        • copyright: ©

        AT&T has an ampersand in their name.

        AT&T is another way to write it.

        This & that.

        4 < 5.

        6 > 5.

        Backslash: \

        Backtick: `

        Asterisk: *

        Underscore: _

        Left brace: {

        Right brace: }

        Left bracket: [

        Right bracket: ]

        Left paren: (

        Right paren: )

        Greater-than: >

        Hash: #

        Period: .

        Bang: !

        Plus: +

        Minus: -