motiro 0.6.8 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +15 -0
- data/README +2 -2
- data/README.en +1 -2
- data/README.pt-br +1 -2
- data/app/controllers/account_controller.rb +1 -1
- data/app/controllers/application.rb +13 -12
- data/app/controllers/javascript_controller.rb +1 -1
- data/app/controllers/report_controller.rb +1 -1
- data/app/controllers/wiki_controller.rb +3 -5
- data/app/core/cache_reporter.rb +1 -1
- data/app/core/cache_reporter_fetcher.rb +1 -1
- data/app/core/chief_editor.rb +1 -1
- data/app/core/reporter.rb +1 -1
- data/app/core/reporter_driver.rb +1 -1
- data/app/core/reporter_fetcher.rb +1 -1
- data/app/core/settings.rb +1 -1
- data/app/core/version.rb +1 -1
- data/app/core/wiki_reporter.rb +1 -1
- data/app/helpers/application_helper.rb +5 -1
- data/app/helpers/default_page_provider.rb +6 -2
- data/app/helpers/report_helper.rb +14 -1
- data/app/models/change.rb +1 -1
- data/app/models/chunk.rb +1 -1
- data/app/models/feed_observer.rb +1 -1
- data/app/models/headline.rb +1 -1
- data/app/models/page.rb +38 -4
- data/app/models/revision.rb +1 -1
- data/app/models/user.rb +1 -1
- data/app/models/wiki_reference.rb +21 -0
- data/app/models/wiki_sweeper.rb +17 -2
- data/app/ports/chdir_runner.rb +1 -1
- data/app/ports/runner.rb +1 -1
- data/app/reporters/darcs_connection.rb +1 -1
- data/app/reporters/darcs_reporter.rb +1 -1
- data/app/reporters/darcs_temp_repo.rb +1 -1
- data/app/reporters/events_reporter.rb +1 -1
- data/app/reporters/features_reporter.rb +1 -1
- data/app/reporters/subversion_reporter.rb +1 -1
- data/app/reporters/svn_connection.rb +1 -1
- data/app/reporters/svn_settings.rb +1 -1
- data/app/views/report/list.rhtml +6 -7
- data/app/views/report/older.rhtml +1 -2
- data/app/views/report/rss.rxml +1 -1
- data/app/views/report/show.rhtml +2 -2
- data/app/views/wiki/_edit_event.rhtml +2 -0
- data/app/views/wiki/_edit_feature.rhtml +2 -0
- data/app/views/wiki/_properties_edit.rhtml +3 -5
- data/app/views/wiki/_properties_show.rhtml +4 -5
- data/app/views/wiki/_show_event.rhtml +3 -0
- data/app/views/wiki/_show_feature.rhtml +2 -0
- data/app/views/wiki/show.rhtml +1 -1
- data/bin/motiro +3 -3
- data/config/routes.rb +1 -1
- data/db/migrate/024_add_feature_status.rb +11 -0
- data/db/migrate/025_add_page_references.rb +12 -0
- data/db/migrate/026_convert_link_syntax.rb +12 -0
- data/db/migrate/027_register_page_references.rb +12 -0
- data/db/motirodb.sqlite.initial +0 -0
- data/db/schema_version +1 -1
- data/db/translation/pt-BR.rb +7 -1
- data/lib/array_extensions.rb +1 -1
- data/lib/diff_chunk_builder.rb +1 -1
- data/lib/differ.rb +1 -1
- data/lib/string_extensions.rb +13 -6
- data/lib/stub_hash.rb +1 -1
- data/lib/tasks/packaging.rake +10 -12
- data/lib/tasks/testing.rake +1 -1
- data/lib/tick_daemon.rb +1 -1
- data/lib/{wiki_url_generator.rb → wiki_link_handler.rb} +13 -3
- data/lib/wiki_renderer.rb +63 -34
- data/public/images/done.png +0 -0
- data/public/images/not-done.png +0 -0
- data/public/stylesheets/motiro.css +8 -0
- data/script/ticker +1 -1
- data/test/acceptance/account_test.rb +1 -1
- data/test/acceptance/darcs_test.rb +1 -1
- data/test/acceptance/events_test.rb +1 -1
- data/test/acceptance/main_page_test.rb +1 -1
- data/test/acceptance/subversion_test.rb +1 -1
- data/test/acceptance/ts_all_suites.rb +1 -1
- data/test/acceptance/wiki_test.rb +3 -3
- data/test/contract/darcs_test.rb +1 -1
- data/test/contract/remote_darcs_test.rb +1 -1
- data/test/contract/svn_test.rb +1 -1
- data/test/fixtures/pages.yml +20 -1
- data/test/fixtures/revisions.yml +40 -1
- data/test/fixtures/wiki_references.yml +5 -0
- data/test/functional/report_controller_test.rb +1 -1
- data/test/functional/report_features_test.rb +8 -1
- data/test/functional/report_subversion_test.rb +1 -1
- data/test/functional/root_controller_test.rb +1 -1
- data/test/functional/wiki_controller_test.rb +67 -2
- data/test/lib/acceptance_test_case.rb +1 -1
- data/test/lib/darcs_excerpts.rb +1 -1
- data/test/lib/darcs_repo.rb +1 -1
- data/test/lib/hash_extensions.rb +22 -0
- data/test/lib/live_mode_test.rb +1 -1
- data/test/lib/netutils.rb +1 -1
- data/test/lib/platform_thread.rb +1 -1
- data/test/lib/selenium_extensions.rb +1 -1
- data/test/lib/stubio.rb +1 -1
- data/test/lib/webserver.rb +1 -1
- data/test/meta/darcs_repo_test.rb +1 -1
- data/test/meta/local_svn_test.rb +1 -1
- data/test/meta/platform_thread_test.rb +1 -1
- data/test/meta/stubio_test.rb +1 -1
- data/test/stubs/{url_generator.rb → wiki_link_handler.rb} +8 -4
- data/test/test_helper.rb +3 -1
- data/test/unit/array_extensions_test.rb +1 -1
- data/test/unit/cache_reporter_fetcher_test.rb +1 -1
- data/test/unit/cache_reporter_test.rb +1 -1
- data/test/unit/change_test.rb +1 -1
- data/test/unit/chdir_runner_test.rb +1 -1
- data/test/unit/chief_editor_test.rb +1 -1
- data/test/unit/darcs_connection_test.rb +1 -1
- data/test/unit/darcs_reporter_test.rb +4 -4
- data/test/unit/darcs_temp_repo_test.rb +1 -1
- data/test/unit/default_page_provider_test.rb +23 -13
- data/test/unit/diff_chunk_builder_test.rb +1 -1
- data/test/unit/page_test.rb +67 -4
- data/test/unit/reporter_driver_test.rb +1 -1
- data/test/unit/reporter_test.rb +1 -1
- data/test/unit/revision_test.rb +1 -1
- data/test/unit/runner_test.rb +1 -1
- data/test/unit/string_extensions_test.rb +15 -3
- data/test/unit/svn_connection_test.rb +1 -1
- data/test/unit/svn_reporter_interaction_test.rb +1 -1
- data/test/unit/svn_reporter_test.rb +1 -1
- data/test/unit/svn_settings_test.rb +1 -1
- data/test/unit/user_test.rb +1 -1
- data/test/unit/{wiki_url_generator_test.rb → wiki_link_handler_test.rb} +3 -3
- data/test/unit/wiki_renderer_test.rb +75 -20
- data/test/unit/wiki_reporter_test.rb +1 -1
- data/vendor/mediacloth-trunk/MIT-LICENSE +20 -0
- data/vendor/mediacloth-trunk/README +32 -0
- data/vendor/mediacloth-trunk/Rakefile +33 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiast.rb +122 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikihtmlgenerator.rb +252 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikilexer.rb +821 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikilinkhandler.rb +68 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparams.rb +33 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparser.rb +1218 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparser.y +493 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiwalker.rb +146 -0
- data/vendor/mediacloth-trunk/lib/mediacloth.rb +29 -0
- data/vendor/mediacloth-trunk/mediacloth.gemspec +24 -0
- data/vendor/mediacloth-trunk/mediacloth.kdevelop +117 -0
- data/vendor/mediacloth-trunk/setup.rb +1585 -0
- data/vendor/mediacloth-trunk/test/data/html1 +26 -0
- data/vendor/mediacloth-trunk/test/data/html10 +130 -0
- data/vendor/mediacloth-trunk/test/data/html11 +17 -0
- data/vendor/mediacloth-trunk/test/data/html12 +12 -0
- data/vendor/mediacloth-trunk/test/data/html13 +11 -0
- data/vendor/mediacloth-trunk/test/data/html2 +2 -0
- data/vendor/mediacloth-trunk/test/data/html3 +1 -0
- data/vendor/mediacloth-trunk/test/data/html4 +47 -0
- data/vendor/mediacloth-trunk/test/data/html5 +57 -0
- data/vendor/mediacloth-trunk/test/data/html6 +8 -0
- data/vendor/mediacloth-trunk/test/data/html7 +45 -0
- data/vendor/mediacloth-trunk/test/data/html8 +1 -0
- data/vendor/mediacloth-trunk/test/data/html9 +14 -0
- data/vendor/mediacloth-trunk/test/data/input1 +34 -0
- data/vendor/mediacloth-trunk/test/data/input10 +124 -0
- data/vendor/mediacloth-trunk/test/data/input11 +17 -0
- data/vendor/mediacloth-trunk/test/data/input12 +15 -0
- data/vendor/mediacloth-trunk/test/data/input13 +10 -0
- data/vendor/mediacloth-trunk/test/data/input2 +2 -0
- data/vendor/mediacloth-trunk/test/data/input3 +2 -0
- data/vendor/mediacloth-trunk/test/data/input4 +50 -0
- data/vendor/mediacloth-trunk/test/data/input5 +63 -0
- data/vendor/mediacloth-trunk/test/data/input6 +8 -0
- data/vendor/mediacloth-trunk/test/data/input7 +45 -0
- data/vendor/mediacloth-trunk/test/data/input8 +1 -0
- data/vendor/mediacloth-trunk/test/data/input9 +14 -0
- data/vendor/mediacloth-trunk/test/data/lex1 +26 -0
- data/vendor/mediacloth-trunk/test/data/lex10 +85 -0
- data/vendor/mediacloth-trunk/test/data/lex11 +17 -0
- data/vendor/mediacloth-trunk/test/data/lex12 +15 -0
- data/vendor/mediacloth-trunk/test/data/lex13 +3 -0
- data/vendor/mediacloth-trunk/test/data/lex2 +2 -0
- data/vendor/mediacloth-trunk/test/data/lex3 +1 -0
- data/vendor/mediacloth-trunk/test/data/lex4 +47 -0
- data/vendor/mediacloth-trunk/test/data/lex5 +57 -0
- data/vendor/mediacloth-trunk/test/data/lex6 +8 -0
- data/vendor/mediacloth-trunk/test/data/lex7 +45 -0
- data/vendor/mediacloth-trunk/test/data/lex8 +1 -0
- data/vendor/mediacloth-trunk/test/data/lex9 +14 -0
- data/vendor/mediacloth-trunk/test/data/result1 +48 -0
- data/vendor/mediacloth-trunk/test/dataproducers/html.rb +18 -0
- data/vendor/mediacloth-trunk/test/dataproducers/lex.rb +15 -0
- data/vendor/mediacloth-trunk/test/debugwalker.rb +68 -0
- data/vendor/mediacloth-trunk/test/htmlgenerator.rb +97 -0
- data/vendor/mediacloth-trunk/test/lexer.rb +542 -0
- data/vendor/mediacloth-trunk/test/linkhandler.rb +39 -0
- data/vendor/mediacloth-trunk/test/parser.rb +22 -0
- data/vendor/mediacloth-trunk/test/testhelper.rb +27 -0
- data/vendor/mediacloth.rb +3 -0
- data/vendor/motiro-installer.rb +1 -1
- data/vendor/plugins/cache_test-0.2/CHANGELOG +14 -0
- data/vendor/plugins/cache_test-0.2/MIT-LICENSE +20 -0
- data/vendor/plugins/cache_test-0.2/README +124 -0
- data/vendor/plugins/cache_test-0.2/init.rb +8 -0
- data/vendor/plugins/cache_test-0.2/lib/fragment_cache_test.rb +205 -0
- data/vendor/plugins/cache_test-0.2/lib/page_cache_test.rb +140 -0
- data/vendor/plugins/global_routing/init.rb +1 -1
- metadata +517 -455
@@ -0,0 +1,63 @@
|
|
1
|
+
Unordered lists
|
2
|
+
|
3
|
+
*A
|
4
|
+
**A
|
5
|
+
***a
|
6
|
+
***b
|
7
|
+
****a
|
8
|
+
*B
|
9
|
+
**b
|
10
|
+
|
11
|
+
*A
|
12
|
+
*B
|
13
|
+
*
|
14
|
+
|
15
|
+
Ordered lists
|
16
|
+
|
17
|
+
#a
|
18
|
+
##a
|
19
|
+
###a
|
20
|
+
####a
|
21
|
+
#a
|
22
|
+
##aa
|
23
|
+
|
24
|
+
#A
|
25
|
+
#B
|
26
|
+
#
|
27
|
+
|
28
|
+
Mixed lists
|
29
|
+
|
30
|
+
*a
|
31
|
+
*#1
|
32
|
+
*#2
|
33
|
+
*b
|
34
|
+
|
35
|
+
#a
|
36
|
+
#*1
|
37
|
+
#*2
|
38
|
+
#**2
|
39
|
+
#b
|
40
|
+
|
41
|
+
Dictionary lists
|
42
|
+
|
43
|
+
;d
|
44
|
+
|
45
|
+
|
46
|
+
:t
|
47
|
+
|
48
|
+
|
49
|
+
;d
|
50
|
+
:t
|
51
|
+
|
52
|
+
|
53
|
+
;d
|
54
|
+
:t
|
55
|
+
:t
|
56
|
+
|
57
|
+
|
58
|
+
;d
|
59
|
+
:t
|
60
|
+
;d
|
61
|
+
:t
|
62
|
+
|
63
|
+
;d :t [[image:foo.jpg]]
|
@@ -0,0 +1,45 @@
|
|
1
|
+
http://sun.com
|
2
|
+
|
3
|
+
[http://sun.com]
|
4
|
+
|
5
|
+
[mailto:joe@sun.com]
|
6
|
+
|
7
|
+
[http://sun.com stars]
|
8
|
+
|
9
|
+
[http://sun.com stars and moon]
|
10
|
+
|
11
|
+
[http://sun.com stars and ''moon'' and '''trees''' and birds]
|
12
|
+
|
13
|
+
[http://sun.com <tt>sun</tt> and <tt>moon</tt>]
|
14
|
+
|
15
|
+
[http://sun.com sun > moon]
|
16
|
+
|
17
|
+
[[sun]]
|
18
|
+
|
19
|
+
[[sun|All about Sun]]
|
20
|
+
|
21
|
+
[[image:sun|All about Sun]]
|
22
|
+
|
23
|
+
[[sun|nofollow|All about Sun]]
|
24
|
+
|
25
|
+
[[sun|nofollow|Sun > Moon]]
|
26
|
+
|
27
|
+
[[sun|nofollow|<tt>sun</tt> and <tt>moon</tt>]]
|
28
|
+
|
29
|
+
[[image:sun|nofollow|All about Sun]]
|
30
|
+
|
31
|
+
[[image:sun|All about [[Sun]]]]
|
32
|
+
|
33
|
+
[[image:sun|All about [[sun|More about]]]]
|
34
|
+
|
35
|
+
[[image:sun|one||two||three|]]
|
36
|
+
|
37
|
+
[[image:sun|one|[[aaa|bbb|ccc]]|[[image:moon|aaa|bbb|ccc]]|two]]
|
38
|
+
|
39
|
+
[]
|
40
|
+
|
41
|
+
[ ]
|
42
|
+
|
43
|
+
[[]]
|
44
|
+
|
45
|
+
[[ ]]
|
@@ -0,0 +1 @@
|
|
1
|
+
=== foo ===
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Some examples of wiki escaping.
|
2
|
+
|
3
|
+
A paragraph with some wiki characters: <nowiki>''italic'' '''bold''' [[Link]]</nowiki>
|
4
|
+
|
5
|
+
An escaped list:
|
6
|
+
<nowiki>
|
7
|
+
* one
|
8
|
+
* two
|
9
|
+
* three
|
10
|
+
</nowiki>
|
11
|
+
|
12
|
+
Text escaped in a heading:
|
13
|
+
|
14
|
+
==Heading with <nowiki>'''</nowiki>==
|
@@ -0,0 +1,26 @@
|
|
1
|
+
PARA_STARTTEXTThis is a simple text with BOLD_START'''TEXTBold textBOLD_END'''TEXT and ITALIC_START''TEXTItalic textITALIC_END''TEXT inside.
|
2
|
+
One paragraph can be written in several lines.
|
3
|
+
|
4
|
+
PARA_ENDPARA_STARTTEXTAnother paragraph starts after a blank line.
|
5
|
+
|
6
|
+
PARA_ENDPARA_STARTTEXT
|
7
|
+
Another one.
|
8
|
+
|
9
|
+
PARA_ENDPARA_STARTTEXTThis is text with INTLINK_START[[TEXTInternal LinkINTLINK_END]]TEXT and LINK_START[TEXThttp://www.example.comLINKSEP TEXTexternal linkLINK_END]TEXT.
|
10
|
+
|
11
|
+
PARA_ENDPARA_STARTTEXTWe can have headlines:
|
12
|
+
|
13
|
+
PARA_ENDSECTION_START=TEXT Headline1 SECTION_END=SECTION_START==TEXT Headline2 SECTION_END==SECTION_START===TEXT Headline3 SECTION_END===SECTION_START====TEXT Headline4 SECTION_END====SECTION_START=====TEXT Headline5 SECTION_END=====SECTION_START======TEXT Headline6 SECTION_END======SECTION_START=======TEXT Headline7 SECTION_END=======PARA_STARTTEXT
|
14
|
+
|
15
|
+
PARA_ENDPARA_STARTTEXTHeadlines may have formatting:
|
16
|
+
|
17
|
+
PARA_ENDSECTION_START=TEXT See INTLINK_START[[TEXTInternal LinkINTLINK_END]]TEXT for more info SECTION_END=SECTION_START==TEXT This is an BOLD_START'''TEXTimportantBOLD_END'''TEXT heading SECTION_END==PARA_STARTTEXT
|
18
|
+
|
19
|
+
PARA_ENDPRE_STARTTEXT This is a preformatted BOLD_START'''TEXT BOLD_END'''TEXT << ITALIC_START''TEXT ITALIC_END''TEXT text
|
20
|
+
yes
|
21
|
+
PRE_ENDHLINE----PARA_STARTTEXT
|
22
|
+
This is a text after the line.
|
23
|
+
|
24
|
+
PARA_ENDUL_STARTLI_STARTTEXTfoo
|
25
|
+
LI_ENDLI_STARTTEXT foo2
|
26
|
+
LI_ENDUL_ENDfalsefalse
|
@@ -0,0 +1,85 @@
|
|
1
|
+
PARA_STARTTEXTSome examples of tables.
|
2
|
+
|
3
|
+
PARA_ENDTABLE_START{|TABLE_END|}PARA_STARTTEXT
|
4
|
+
|
5
|
+
PARA_ENDTABLE_START{|ROW_START|-ROW_ENDTABLE_END|}PARA_STARTTEXT
|
6
|
+
|
7
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
8
|
+
CELL_ENDCELL_START|TEXT b
|
9
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
10
|
+
|
11
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
12
|
+
CELL_ENDCELL_START|TEXT b
|
13
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT 1
|
14
|
+
CELL_ENDCELL_START|TEXT 2
|
15
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
16
|
+
|
17
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a CELL_ENDCELL_START||TEXT b
|
18
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT 1 CELL_ENDCELL_START||TEXT 2
|
19
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
20
|
+
|
21
|
+
PARA_ENDTABLE_START{|ROW_STARTHEAD_START!TEXT a
|
22
|
+
HEAD_ENDHEAD_START!TEXT b
|
23
|
+
HEAD_ENDROW_ENDROW_START|-CELL_START|TEXT 1
|
24
|
+
CELL_ENDCELL_START|TEXT 2
|
25
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
26
|
+
|
27
|
+
PARA_ENDTABLE_START{|ROW_STARTHEAD_START!TEXT a HEAD_ENDHEAD_START||TEXT b
|
28
|
+
HEAD_ENDROW_ENDROW_START|-CELL_START|TEXT 1 CELL_ENDCELL_START||TEXT 2
|
29
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
30
|
+
|
31
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
32
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT 1
|
33
|
+
CELL_ENDCELL_START|TEXT 2
|
34
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
35
|
+
|
36
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
37
|
+
CELL_ENDCELL_START|TEXT b
|
38
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT 1
|
39
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
40
|
+
|
41
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
42
|
+
CELL_ENDCELL_START|TEXT b
|
43
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|CELL_ENDCELL_START|TEXT 2
|
44
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
45
|
+
|
46
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT LINK_START[TEXThttp://example.comLINKSEP TEXTExampleLINK_END]CELL_ENDCELL_START|TEXT BOLD_START'''TEXTboldBOLD_END'''CELL_ENDROW_ENDROW_START|-CELL_START|TEXT INTLINK_START[[TEXTexampleINTLINKSEP|TEXTExampleINTLINK_END]]CELL_ENDCELL_START|TEXT INTLINK_START[[TEXTimageRESOURCESEP:TEXTexample.jpgINTLINKSEP|TEXT1INTLINKSEP|TEXT2INTLINKSEP|TEXT3INTLINK_END]]CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
47
|
+
|
48
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT LINK_START[TEXThttp://example.comLINKSEP TEXTExampleLINK_ENDCELL_ENDCELL_START|TEXT BOLD_START'''TEXTbold
|
49
|
+
BOLD_ENDCELL_ENDROW_ENDROW_START|-CELL_START|TEXT INTLINK_START[[TEXTexampleINTLINKSEP|TEXTExampleINTLINK_ENDCELL_ENDCELL_START|TEXT BOLD_START'''TEXTbold ITALIC_START''TEXTitalic
|
50
|
+
ITALIC_ENDBOLD_ENDCELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
51
|
+
|
52
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
53
|
+
CELL_ENDCELL_START|TEXT b
|
54
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT A list in a cell:
|
55
|
+
UL_STARTLI_STARTTEXT one
|
56
|
+
LI_ENDLI_STARTTEXT two
|
57
|
+
LI_ENDUL_ENDCELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
58
|
+
|
59
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
60
|
+
CELL_ENDCELL_START|TEXT b
|
61
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT A table in a cell:
|
62
|
+
TABLE_START{|ROW_STARTCELL_START|TEXT 1
|
63
|
+
CELL_ENDCELL_START|TEXT 2
|
64
|
+
CELL_ENDROW_ENDROW_START|-CELL_START|TEXT one
|
65
|
+
CELL_ENDCELL_START|TEXT two
|
66
|
+
CELL_ENDROW_ENDTABLE_END|}CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
67
|
+
|
68
|
+
PARA_ENDTABLE_START{|TEXT border="1"
|
69
|
+
ROW_STARTHEAD_START!TEXT a
|
70
|
+
HEAD_ENDHEAD_START!TEXT b
|
71
|
+
HEAD_ENDROW_ENDROW_START|-TEXT align="left"
|
72
|
+
CELL_START|TEXT 1
|
73
|
+
CELL_ENDCELL_START|TEXT 2
|
74
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
75
|
+
|
76
|
+
PARA_ENDPARA_STARTTEXT
|
77
|
+
Text before
|
78
|
+
PARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
79
|
+
CELL_ENDCELL_START|TEXT b
|
80
|
+
CELL_ENDROW_ENDTABLE_END|}PARA_STARTTEXT
|
81
|
+
|
82
|
+
PARA_ENDPARA_STARTTEXTText before with ITALIC_START''TEXTitalic
|
83
|
+
ITALIC_ENDPARA_ENDTABLE_START{|ROW_STARTCELL_START|TEXT a
|
84
|
+
CELL_ENDCELL_START|TEXT b
|
85
|
+
CELL_ENDROW_ENDTABLE_END|}falsefalse
|
@@ -0,0 +1,17 @@
|
|
1
|
+
SECTION_START==TEXTExamples of XHTML markup and escaping of XML charactersSECTION_END==PARA_STARTTEXT
|
2
|
+
|
3
|
+
PARA_ENDPARA_STARTTEXTHere is a TAG_STARTttTEXTcode sampleTAG_ENDttTEXT.
|
4
|
+
|
5
|
+
PARA_ENDPARA_STARTTEXTAnother TAG_STARTttATTR_NAMEclassATTR_VALUEcodeTEXTcode sampleTAG_ENDttTEXT.
|
6
|
+
|
7
|
+
PARA_ENDPARA_STARTTEXTAn example of a <tt>code sample</tt>.
|
8
|
+
|
9
|
+
PARA_ENDPARA_STARTTEXTSome math:
|
10
|
+
|
11
|
+
PARA_ENDPRE_STARTTEXT 1 < 2 & 1 > 0
|
12
|
+
PRE_ENDPARA_STARTTEXT
|
13
|
+
And more text.
|
14
|
+
|
15
|
+
PARA_ENDUL_STARTLI_STARTTEXT one
|
16
|
+
LI_ENDLI_STARTTEXT two TAG_STARTspanTEXTa b
|
17
|
+
c d e fTAG_ENDspanLI_ENDUL_ENDfalsefalse
|
@@ -0,0 +1,15 @@
|
|
1
|
+
PARA_STARTTEXTone CHAR_ENTampTEXT two
|
2
|
+
1 CHAR_ENTltTEXT 2
|
3
|
+
CHAR_ENTltTEXTlt; is the "lt" symbol
|
4
|
+
1 < 2 & 3 > 2
|
5
|
+
|
6
|
+
PARA_ENDPARA_STARTTEXTthis CHAR_ENTltCHAR_ENTgtTEXT that
|
7
|
+
|
8
|
+
PARA_ENDPARA_STARTVARIABLE_START{{TEXTrefVARIABLE_END}}TEXT
|
9
|
+
|
10
|
+
PARA_ENDPARA_STARTVARIABLE_START{{TEXT
|
11
|
+
one
|
12
|
+
two
|
13
|
+
VARIABLE_END}}TEXT
|
14
|
+
|
15
|
+
PARA_ENDPARA_STARTTEXT{{}}PARA_ENDfalsefalse
|
@@ -0,0 +1,3 @@
|
|
1
|
+
KEYWORDTOCPARA_STARTTEXT
|
2
|
+
|
3
|
+
PARA_ENDSECTION_START=TEXT Headline1 SECTION_END=SECTION_START==TEXT Sub Headline 1a SECTION_END==SECTION_START==TEXT Sub Headline 1b SECTION_END==SECTION_START=TEXT Headline2 SECTION_END=SECTION_START==TEXT Sub Headline 2a SECTION_END==SECTION_START===TEXT Sub Sub Headline TAG_STARTiTEXT2iTAG_ENDiTEXT SECTION_END===SECTION_START===TEXT Sub Sub Headline BOLD_START'''TEXT2iiBOLD_END'''TEXT SECTION_END===SECTION_START==TEXT Sub Headline 2b SECTION_END==falsefalse
|
@@ -0,0 +1 @@
|
|
1
|
+
PARA_STARTTEXT--SIGNATURE_DATE~~~~~SIGNATURE_NAME~~~SIGNATURE_FULL~~~~PARA_ENDfalsefalse
|
@@ -0,0 +1,47 @@
|
|
1
|
+
PARA_STARTTEXTTest mixing of bold and italic formatting:
|
2
|
+
|
3
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTitalicBOLD_START'''TEXTboldBOLD_END'''TEXTitalicITALIC_END''TEXT
|
4
|
+
|
5
|
+
PARA_ENDPARA_STARTBOLD_START'''TEXTboldITALIC_START''TEXTitalicITALIC_END''TEXTboldBOLD_END'''TEXT
|
6
|
+
|
7
|
+
PARA_ENDPARA_STARTITALIC_START''BOLD_START'''TEXTboldalicBOLD_END'''ITALIC_END''TEXT
|
8
|
+
|
9
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTitalicBOLD_START'''TEXTboldBOLD_END'''TEXTitalicITALIC_END''BOLD_START'''TEXTboldITALIC_START''TEXTitalicITALIC_END''TEXTboldBOLD_END'''TEXT
|
10
|
+
|
11
|
+
PARA_ENDPARA_STARTTEXT
|
12
|
+
Test bold and italic wrapped around inline links:
|
13
|
+
|
14
|
+
PARA_ENDPARA_STARTITALIC_START''LINK_STARTTEXThttp://example.comLINK_ENDITALIC_END''TEXT
|
15
|
+
|
16
|
+
PARA_ENDPARA_STARTBOLD_START'''LINK_STARTTEXThttp://example.comLINK_ENDBOLD_END'''TEXT
|
17
|
+
|
18
|
+
PARA_ENDPARA_STARTITALIC_START''LINK_STARTTEXThttp://example.comLINK_ENDBOLD_START'''TEXT
|
19
|
+
|
20
|
+
BOLD_ENDITALIC_ENDPARA_ENDPARA_STARTBOLD_START'''LINK_STARTTEXThttp://example.comLINK_ENDTEXT' is goodBOLD_END'''TEXT
|
21
|
+
|
22
|
+
PARA_ENDPARA_STARTITALIC_START''LINK_STARTTEXThttp://example.comLINK_ENDTEXT' is goodITALIC_END''TEXT
|
23
|
+
|
24
|
+
PARA_ENDPARA_STARTTEXT
|
25
|
+
Test unclosed bold and italic formatting:
|
26
|
+
|
27
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTSome italic and now ITALIC_END''TEXTbold
|
28
|
+
PARA_ENDSECTION_START==TEXTHeadingSECTION_END==PARA_STARTTEXT
|
29
|
+
Text
|
30
|
+
|
31
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTSome italic and now BOLD_START'''TEXTbold
|
32
|
+
BOLD_ENDITALIC_ENDPARA_ENDSECTION_START==TEXTHeadingSECTION_END==PARA_STARTTEXT
|
33
|
+
Text
|
34
|
+
|
35
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTSome italic and now BOLD_START'''TEXTbold
|
36
|
+
|
37
|
+
BOLD_ENDITALIC_ENDPARA_ENDSECTION_START==TEXTHeadingSECTION_END==PARA_STARTTEXT
|
38
|
+
Text
|
39
|
+
|
40
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTSome italic and now BOLD_START'''TEXTbold
|
41
|
+
BOLD_ENDITALIC_ENDPARA_ENDUL_STARTLI_STARTTEXT one
|
42
|
+
LI_ENDLI_STARTTEXT two
|
43
|
+
LI_ENDUL_ENDPARA_STARTTEXT
|
44
|
+
|
45
|
+
PARA_ENDPARA_STARTITALIC_START''TEXTSome italic and now BOLD_START'''TEXTbold
|
46
|
+
|
47
|
+
BOLD_ENDITALIC_ENDPARA_ENDPARA_STARTTEXTTextPARA_ENDfalsefalse
|
@@ -0,0 +1,57 @@
|
|
1
|
+
PARA_STARTTEXTUnordered lists
|
2
|
+
|
3
|
+
PARA_ENDUL_STARTLI_STARTTEXTA
|
4
|
+
UL_STARTLI_STARTTEXTA
|
5
|
+
UL_STARTLI_STARTTEXTa
|
6
|
+
LI_ENDLI_STARTTEXTb
|
7
|
+
UL_STARTLI_STARTTEXTa
|
8
|
+
LI_ENDUL_ENDLI_ENDUL_ENDLI_ENDUL_ENDLI_ENDLI_STARTTEXTB
|
9
|
+
UL_STARTLI_STARTTEXTb
|
10
|
+
LI_ENDUL_ENDLI_ENDUL_ENDUL_STARTLI_STARTTEXTA
|
11
|
+
LI_ENDLI_STARTTEXTB
|
12
|
+
LI_ENDLI_STARTLI_ENDUL_ENDPARA_STARTTEXT
|
13
|
+
Ordered lists
|
14
|
+
|
15
|
+
PARA_ENDOL_STARTLI_STARTTEXTa
|
16
|
+
OL_STARTLI_STARTTEXTa
|
17
|
+
OL_STARTLI_STARTTEXTa
|
18
|
+
OL_STARTLI_STARTTEXTa
|
19
|
+
LI_ENDOL_ENDLI_ENDOL_ENDLI_ENDOL_ENDLI_ENDLI_STARTTEXTa
|
20
|
+
OL_STARTLI_STARTTEXTaa
|
21
|
+
LI_ENDOL_ENDLI_ENDOL_ENDOL_STARTLI_STARTTEXTA
|
22
|
+
LI_ENDLI_STARTTEXTB
|
23
|
+
LI_ENDLI_STARTLI_ENDOL_ENDPARA_STARTTEXT
|
24
|
+
Mixed lists
|
25
|
+
|
26
|
+
PARA_ENDUL_STARTLI_STARTTEXTa
|
27
|
+
OL_STARTLI_STARTTEXT1
|
28
|
+
LI_ENDLI_STARTTEXT2
|
29
|
+
LI_ENDOL_ENDLI_ENDLI_STARTTEXTb
|
30
|
+
LI_ENDUL_ENDOL_STARTLI_STARTTEXTa
|
31
|
+
UL_STARTLI_STARTTEXT1
|
32
|
+
LI_ENDLI_STARTTEXT2
|
33
|
+
UL_STARTLI_STARTTEXT2
|
34
|
+
LI_ENDUL_ENDLI_ENDUL_ENDLI_ENDLI_STARTTEXTb
|
35
|
+
LI_ENDOL_ENDPARA_STARTTEXT
|
36
|
+
Dictionary lists
|
37
|
+
|
38
|
+
PARA_ENDDL_STARTDT_START;TEXTd
|
39
|
+
DT_ENDDL_ENDPARA_STARTTEXT
|
40
|
+
|
41
|
+
PARA_ENDDL_STARTDD_START:TEXTt
|
42
|
+
DD_ENDDL_ENDPARA_STARTTEXT
|
43
|
+
|
44
|
+
PARA_ENDDL_STARTDT_START;TEXTd
|
45
|
+
DT_ENDDD_START:TEXTt
|
46
|
+
DD_ENDDL_ENDPARA_STARTTEXT
|
47
|
+
|
48
|
+
PARA_ENDDL_STARTDT_START;TEXTd
|
49
|
+
DT_ENDDD_START:TEXTt
|
50
|
+
DD_ENDDD_START:TEXTt
|
51
|
+
DD_ENDDL_ENDPARA_STARTTEXT
|
52
|
+
|
53
|
+
PARA_ENDDL_STARTDT_START;TEXTd
|
54
|
+
DT_ENDDD_START:TEXTt
|
55
|
+
DD_ENDDL_ENDDL_STARTDT_START;TEXTd
|
56
|
+
DT_ENDDD_START:TEXTt
|
57
|
+
DD_ENDDL_ENDDL_STARTDT_START;TEXTd DT_ENDDD_START:TEXTt INTLINK_START[[TEXTimageRESOURCESEP:TEXTfoo.jpgINTLINK_END]]DD_ENDDL_ENDfalsefalse
|
@@ -0,0 +1,8 @@
|
|
1
|
+
PARA_STARTTEXTThis is some text with BOLD_START'''TEXTboldBOLD_END'''TEXT and ITALIC_START''TEXTitalicITALIC_END''TEXT formating.
|
2
|
+
The list is also here:
|
3
|
+
PARA_ENDUL_STARTLI_STARTTEXT List Item 1
|
4
|
+
UL_STARTLI_STARTTEXT Sub list item 1
|
5
|
+
LI_ENDLI_STARTTEXT Sub list item 2
|
6
|
+
LI_ENDUL_ENDLI_ENDLI_STARTTEXT List Item 2
|
7
|
+
LI_ENDUL_ENDPARA_STARTTEXTThe end
|
8
|
+
PARA_ENDHLINE----falsefalse
|
@@ -0,0 +1,45 @@
|
|
1
|
+
PARA_STARTLINK_STARTTEXThttp://sun.comLINK_ENDTEXT
|
2
|
+
|
3
|
+
PARA_ENDPARA_STARTLINK_START[TEXThttp://sun.comLINK_END]TEXT
|
4
|
+
|
5
|
+
PARA_ENDPARA_STARTLINK_START[TEXTmailto:joe@sun.comLINK_END]TEXT
|
6
|
+
|
7
|
+
PARA_ENDPARA_STARTLINK_START[TEXThttp://sun.comLINKSEP TEXTstarsLINK_END]TEXT
|
8
|
+
|
9
|
+
PARA_ENDPARA_STARTLINK_START[TEXThttp://sun.comLINKSEP TEXTstars and moonLINK_END]TEXT
|
10
|
+
|
11
|
+
PARA_ENDPARA_STARTLINK_START[TEXThttp://sun.comLINKSEP TEXTstars and ITALIC_START''TEXTmoonITALIC_END''TEXT and BOLD_START'''TEXTtreesBOLD_END'''TEXT and birdsLINK_END]TEXT
|
12
|
+
|
13
|
+
PARA_ENDPARA_STARTLINK_START[TEXThttp://sun.comLINKSEP TAG_STARTttTEXTsunTAG_ENDttTEXT and TAG_STARTttTEXTmoonTAG_ENDttLINK_END]TEXT
|
14
|
+
|
15
|
+
PARA_ENDPARA_STARTLINK_START[TEXThttp://sun.comLINKSEP TEXTsun > moonLINK_END]TEXT
|
16
|
+
|
17
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTsunINTLINK_END]]TEXT
|
18
|
+
|
19
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTsunINTLINKSEP|TEXTAll about SunINTLINK_END]]TEXT
|
20
|
+
|
21
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTimageRESOURCESEP:TEXTsunINTLINKSEP|TEXTAll about SunINTLINK_END]]TEXT
|
22
|
+
|
23
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTsunINTLINKSEP|TEXTnofollow|All about SunINTLINK_END]]TEXT
|
24
|
+
|
25
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTsunINTLINKSEP|TEXTnofollow|Sun > MoonINTLINK_END]]TEXT
|
26
|
+
|
27
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTsunINTLINKSEP|TEXTnofollow|TAG_STARTttTEXTsunTAG_ENDttTEXT and TAG_STARTttTEXTmoonTAG_ENDttINTLINK_END]]TEXT
|
28
|
+
|
29
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTimageRESOURCESEP:TEXTsunINTLINKSEP|TEXTnofollowINTLINKSEP|TEXTAll about SunINTLINK_END]]TEXT
|
30
|
+
|
31
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTimageRESOURCESEP:TEXTsunINTLINKSEP|TEXTAll about INTLINK_START[[TEXTSunINTLINK_END]]INTLINK_END]]TEXT
|
32
|
+
|
33
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTimageRESOURCESEP:TEXTsunINTLINKSEP|TEXTAll about INTLINK_START[[TEXTsunINTLINKSEP|TEXTMore aboutINTLINK_END]]INTLINK_END]]TEXT
|
34
|
+
|
35
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTimageRESOURCESEP:TEXTsunINTLINKSEP|TEXToneINTLINKSEP|INTLINKSEP|TEXTtwoINTLINKSEP|INTLINKSEP|TEXTthreeINTLINKSEP|INTLINK_END]]TEXT
|
36
|
+
|
37
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXTimageRESOURCESEP:TEXTsunINTLINKSEP|TEXToneINTLINKSEP|INTLINK_START[[TEXTaaaINTLINKSEP|TEXTbbb|cccINTLINK_END]]INTLINKSEP|INTLINK_START[[TEXTimageRESOURCESEP:TEXTmoonINTLINKSEP|TEXTaaaINTLINKSEP|TEXTbbbINTLINKSEP|TEXTcccINTLINK_END]]INTLINKSEP|TEXTtwoINTLINK_END]]TEXT
|
38
|
+
|
39
|
+
PARA_ENDPARA_STARTTEXT[]
|
40
|
+
|
41
|
+
PARA_ENDPARA_STARTTEXT[ ]
|
42
|
+
|
43
|
+
PARA_ENDPARA_STARTTEXT[[]]
|
44
|
+
|
45
|
+
PARA_ENDPARA_STARTINTLINK_START[[TEXT INTLINK_END]]PARA_ENDfalsefalse
|
@@ -0,0 +1 @@
|
|
1
|
+
SECTION_START===TEXT foo SECTION_END===falsefalse
|
@@ -0,0 +1,14 @@
|
|
1
|
+
PARA_STARTTEXTSome examples of wiki escaping.
|
2
|
+
|
3
|
+
PARA_ENDPARA_STARTTEXTA paragraph with some wiki characters: ''italic'' '''bold''' [[Link]]
|
4
|
+
|
5
|
+
PARA_ENDPARA_STARTTEXTAn escaped list:
|
6
|
+
|
7
|
+
* one
|
8
|
+
* two
|
9
|
+
* three
|
10
|
+
|
11
|
+
|
12
|
+
PARA_ENDPARA_STARTTEXTText escaped in a heading:
|
13
|
+
|
14
|
+
PARA_ENDSECTION_START==TEXTHeading with '''SECTION_END==falsefalse
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<p>This is a simple text with <b>Bold text</b> and <i>Italic text</i> inside.
|
2
|
+
One paragraph can be written in several lines.
|
3
|
+
|
4
|
+
</p><p>Another paragraph starts after a blank line.
|
5
|
+
</p><p><br>
|
6
|
+
Another one.
|
7
|
+
</p><p>This is text with <a href="/wiki/index.php?title=Internal_Link&action=edit" class="new" title="Internal Link">Internal Link</a> and <a href="http://www.example.com" class="external text" title="http://www.example.com" rel="nofollow">external link</a>.
|
8
|
+
</p><p>We can have headlines:
|
9
|
+
</p><p><br>
|
10
|
+
</p>
|
11
|
+
<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div>
|
12
|
+
|
13
|
+
<ul style="display: block;">
|
14
|
+
<li class="toclevel-1"><a href="#Headline1"><span class="tocnumber">1</span> <span class="toctext">Headline1</span></a>
|
15
|
+
<ul>
|
16
|
+
<li class="toclevel-2"><a href="#Headline2"><span class="tocnumber">1.1</span> <span class="toctext">Headline2</span></a>
|
17
|
+
<ul>
|
18
|
+
<li class="toclevel-3"><a href="#Headline3"><span class="tocnumber">1.1.1</span> <span class="toctext">Headline3</span></a>
|
19
|
+
<ul>
|
20
|
+
<li class="toclevel-4"><a href="#Headline4"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Headline4</span></a></li>
|
21
|
+
|
22
|
+
</ul>
|
23
|
+
</li>
|
24
|
+
</ul>
|
25
|
+
</li>
|
26
|
+
</ul>
|
27
|
+
</li>
|
28
|
+
</ul>
|
29
|
+
</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
|
30
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=1" title="Edit section: Headline1">edit</a>]</div><a name="Headline1"></a><h1> Headline1 </h1>
|
31
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=2" title="Edit section: Headline2">edit</a>]</div><a name="Headline2"></a><h2> Headline2 </h2>
|
32
|
+
|
33
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=3" title="Edit section: Headline3">edit</a>]</div><a name="Headline3"></a><h3> Headline3 </h3>
|
34
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=4" title="Edit section: Headline4">edit</a>]</div><a name="Headline4"></a><h4> Headline4 </h4>
|
35
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=5" title="Edit section: Headline5">edit</a>]</div><a name="Headline5"></a><h5> Headline5 </h5>
|
36
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=6" title="Edit section: Headline6">edit</a>]</div><a name="Headline6"></a><h6> Headline6 </h6>
|
37
|
+
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/wiki/index.php?title=Test&action=edit&section=7" title="Edit section: = Headline7 =">edit</a>]</div><a name=".3D_Headline7_.3D"></a><h6>= Headline7 =</h6>
|
38
|
+
<pre>This is a preformatted <b> </b> << <i> </i> text
|
39
|
+
yes
|
40
|
+
|
41
|
+
|
42
|
+
</pre>
|
43
|
+
<hr>
|
44
|
+
<p>This is a text after the line.
|
45
|
+
</p>
|
46
|
+
<ul><li>foo
|
47
|
+
</li><li> foo2
|
48
|
+
</li></ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'mediacloth'
|
2
|
+
|
3
|
+
def produce(index)
|
4
|
+
file = File.new("../test/data/html#{index}", "w")
|
5
|
+
inputFile = File.new("../test/data/input#{index}", "r")
|
6
|
+
input = inputFile.read
|
7
|
+
parser = MediaWikiParser.new
|
8
|
+
parser.lexer = MediaWikiLexer.new
|
9
|
+
ast = parser.parse(input)
|
10
|
+
MediaWikiParams.instance.time = Time.mktime(2000, 1, 1, 1, 1, 1, 1)
|
11
|
+
generator = MediaWikiHTMLGenerator.new
|
12
|
+
generator.parse(ast)
|
13
|
+
file.write(generator.html)
|
14
|
+
file.close
|
15
|
+
end
|
16
|
+
|
17
|
+
(1..13).each { |i| produce(i) }
|
18
|
+
#produce(13)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'mediacloth/mediawikilexer'
|
2
|
+
|
3
|
+
def produce(index)
|
4
|
+
file = File.new("../test/data/lex#{index}", "w")
|
5
|
+
inputFile = File.new("../test/data/input#{index}", "r")
|
6
|
+
input = inputFile.read
|
7
|
+
|
8
|
+
lexer = MediaWikiLexer.new
|
9
|
+
tokens = lexer.tokenize(input)
|
10
|
+
file.write(tokens.to_s)
|
11
|
+
file.close
|
12
|
+
end
|
13
|
+
|
14
|
+
(1..13).each { |i| produce(i) }
|
15
|
+
#produce(13)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'mediacloth/mediawikiwalker'
|
2
|
+
|
3
|
+
#A walker to build textual representation of the parse tree.
|
4
|
+
#
|
5
|
+
#Use as any other walker and then query for tree:
|
6
|
+
# parser = MediaWikiParser.new
|
7
|
+
# parser.lexer = MediaWikiLexer.new
|
8
|
+
# ast = parser.parse(input)
|
9
|
+
# walker = DebugWalker.new
|
10
|
+
# walker.parse(ast)
|
11
|
+
# puts walker.tree
|
12
|
+
class DebugWalker < MediaWikiWalker
|
13
|
+
|
14
|
+
#The textual representation of the parse tree.
|
15
|
+
attr_reader :tree
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
super
|
19
|
+
@tree = ""
|
20
|
+
end
|
21
|
+
|
22
|
+
protected
|
23
|
+
|
24
|
+
def parse_wiki_ast(ast)
|
25
|
+
info(ast)
|
26
|
+
super(ast)
|
27
|
+
end
|
28
|
+
|
29
|
+
def parse_paragraph(ast)
|
30
|
+
info(ast)
|
31
|
+
super(ast)
|
32
|
+
end
|
33
|
+
|
34
|
+
def parse_text(ast)
|
35
|
+
info(ast, ast.formatting)
|
36
|
+
super(ast)
|
37
|
+
end
|
38
|
+
|
39
|
+
def parse_list(ast)
|
40
|
+
info(ast, ast.class)
|
41
|
+
super(ast)
|
42
|
+
end
|
43
|
+
|
44
|
+
def parse_list_item(ast)
|
45
|
+
info(ast)
|
46
|
+
super(ast)
|
47
|
+
end
|
48
|
+
|
49
|
+
def parse_preformatted(ast)
|
50
|
+
info(ast)
|
51
|
+
end
|
52
|
+
|
53
|
+
def parse_section(ast)
|
54
|
+
info(ast)
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
#Pretty-print ast node information
|
59
|
+
def info(ast, *args)
|
60
|
+
@tree += "#{ast.class}"
|
61
|
+
if args.length > 0
|
62
|
+
@tree += ": "
|
63
|
+
args.each { |arg| @tree += "#{arg} " }
|
64
|
+
end
|
65
|
+
@tree += "\n"
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|