# Copyright (c) 2006-2010 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: WikiText.bunit,v 1.33 2010/05/14 03:08:21 nagler Exp $ WikiText({die_on_validate_error => 0}); [ <<'IN' => trim_space(<<'OUT'), @h1 foo @blockquote my stuff @/blockquote IN

foo

my stuff

OUT '^' => qq{

^\n

}, '' => '', 'a' => qq{

a\n

}, "a\n\nb" => qq{

a\n

b\n

}, '*a*bold*phrase*' => qq{

a bold phrase\n

}, '(*a*)' => qq{

(a)\n

}, '_emphasis_' => qq{

emphasis\n

}, 'a *bold* _emphasis_ mix' => qq{

a bold emphasis mix\n

}, 'MixedCase' => qq{

MixedCase\n

}, '^^ MixedCase' => qq{

^ MixedCase\n

}, '^^MixedCase' => qq{

^MixedCase\n

}, '^M' => qr{

M\n

}, '^M MiC' => qr{

M MiC\n

}, '^Space_Here' => qr{

Space Here\n

}, ' MiC ' => qr{

MiC \n

}, '(^MiC)' => qr{

\(MiC\)\n

}, 'e.g.' => qq{

e.g.\n

}, '^/a/b' => qq{

/a/b\n

}, '^/a/b.' => qq{

/a/b.\n

}, '^http://a.com' => qq{

http://a.com\n

}, '^http://a.com.' => qq{

http://a.com.\n

}, '^http://a.com?' => qq{

http://a.com?\n

}, '_^http://a.com_' => qq{

http://a.com\n

}, '^http://a.com/a_x_y' => qq{

http://a.com/a_x_y\n

}, '^a@a.a,' => qq{

a\@a.a,\n

}, '<^a@a.a>' => qq{

<a\@a.a>\n

}, '^icon.jpg' => qr{

icon.jpg\n

}, '^/icon.jpg' => qq{

/icon.jpg\n

}, 'Module.pm' => qq{

Module.pm\n

}, '^Module.ch' => qq{

Module.ch\n

}, 'a.com' => qq{

a.com\n

}, '^a.com' => qq{

a.com\n

}, '^a.com a.com' => qq{

a.com a.com\n

}, '^a.com.' => qq{

a.com.\n

}, 'a & b' => qq{

a & b\n

}, 'a ^^& b' => qq{

a ^& b\n

}, 'a @hr < b > c >= d =>' => qq{

a \@hr < b > c >= d =>\n

}, '&' => qq{

&amp;\n

}, '--' => qq{

}, '@br' => qq{
}, '@br dropped text' => qq{
}, <<'IN' => trim_space(<<'OUT'), @table @tr @td one @table @tr @td two IN

one

two

OUT <<'IN' => trim_space(<<'OUT'), @h1 h 1 p1 IN

h 1

p1

OUT <<'IN' => trim_space(<<'OUT'), @h1 h1a @br h1b @/h1 p1 IN

h1a
h1b

p1

OUT '@p *x*' => qq{

x

}, foo_bar => qq{

foo_bar\n

}, # DIV means you are in "advanced" mode, and auto-paragraphing # is off. '@div' => qq{
}, "\@div\n\@/div" => qq{
}, "\@div.c1\n\@/div" => qq{
}, "\@div.c1.c2 x1\n" => qq{
x1
}, "\@div class=c1\n\@/div" => qq{
}, "\@div\na\n\nb" => qq{
a\n\nb\n
}, "\@div\n\na\n\nb" => qq{
\na\n\nb\n
}, '@code *x*' => qq{

*x*

}, "\@li\n\@code *x*" => qq{
  • *x*

  • }, '@ ' => qq{

     \n

    }, '@®' => qq{

    ®\n

    }, '@®' => qq{

    ®\n

    }, '@"' => qr{\Q>"}, '@"@"' => qr{\Q>""}, '@td @®' => qq{

    ®

    }, '@hr' => qq{
    \n}, '@@other' => qq{

    \@other\n

    }, '@badtag' => qq{}, '@my/bp/Shell_Util_Help' => qq{}, "\n\@hr" => qr{\n
    }, '@center' => qq{}, '@a' => qq{

    }, '@a href=/x y' => qq{

    y

    }, '@a href=x y' => qr{

    y

    }, '@a href=^x y' => qr{

    y

    }, '@a href=^x ^y' => qr{

    y

    }, '@a href=^x ^y.jpg' => qr{

    y.jpg

    }, '@a href=a.com y' => qr{

    y

    }, '@a href=^cateye.com y' => qq{

    y

    }, '@a href= class=y x' => qr{

    x

    }, "\@a href=\nz" => qr{

    z\n

    }, '^/foo.doc' => qq{

    /foo.doc\n

    }, '@img src="x"' => qr{}, "a\@\nb" => qq{

    a\nb\n

    }, "a\@\n\nb" => qq{

    a\n

    b\n

    }, "\@a href=/ a\@\nb" => qq{

    ab\n

    }, "\@span a\@\nb\@" => qq{

    ab\n

    }, '@a href=javascript:/ x' => qq{

    x

    }, "\@a name=x" => qq{

    }, '@a href=/ foo.org' => qq{

    foo.org

    }, '@a href=x#a y' => qr{

    y

    }, '@a href=^x#a y' => qr{

    y

    }, '^M#a' => qr{

    M a\n

    }, <<'IN' => trim_space(<<'OUT'), @table @tr @td @ul @li item1 @li item2 IN
    • item1

    • item2

    OUT <<'IN' => trim_space(<<'OUT'), @h3 h 3 p1 p2 @h2 h 2 p3 @table class=c1 @tbody @tr @td 1.1 @td @!comment ignored 1.2 @td @tr @td 2.1 @td class=number 2.2 @/tbody @tr @td 3.1p1 3.1p2 @/table @ol @li i1.1 i1.2 @li @p i2 @li i3 @/ol @pre @hr < & @ c *b* _i_ IN

    h 3

    p1

    p2

    h 2

    p3

    1.1

    1.2

    2.1

    2.2

    3.1p1

    3.1p2

    1. i1.1

      i1.2

    2. i2

    3. i3


    OUT 'MixedCaseOnly' => qq{

    MixedCaseOnly\n

    }, ' MiC ' => qq{

    MiC \n

    }, '/a/b' => qq{

    /a/b\n

    }, 'http://a.com' => qq{

    http://a.com\n

    }, 'a@a.a' => qq{

    a\@a.a\n

    }, 'Module.ch' => qq{

    Module.ch\n

    }, 'a.com' => qq{

    a.com\n

    }, '@a href=/x y' => qq{

    y

    }, '@a href=x y' => qr{

    y

    }, '/foo.doc' => qq{

    /foo.doc\n

    }, '@img src="x"' => qr{}, '@a href=/ foo.org' => qq{

    foo.org

    }, "\@div x\ny" => qq{
    x

    y\n

    }, <<'IN' => trim_space(<<'OUT'), @form method=POST action=/bunit_wiki/Forms/wikiform enctype=multipart/form-data @div @input type=text name=w1 value="" @textarea name=w5 rows=4 cols=40 @textarea name=w6 rows=4 cols=40 value6 @/textarea @textarea name=w7 rows=4 cols=40 value7 @fieldset @legend options @select name=w8 @option value=7 Seven @option selected=1 Eight @/select @/fieldset @input type="submit" name="submit" value="OK" @/form IN
    options
    OUT ];