tartan 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +32 -0
- data/Manifest.txt +4 -0
- data/Rakefile +17 -5
- data/lib/tartan/attribute/attribute.yml +39 -0
- data/lib/tartan/attribute/rules.rb +11 -0
- data/lib/tartan/markdown/markdown.yml +9 -1
- data/lib/tartan/table/table.yml +4 -4
- data/lib/tartan/test/test_base.yml +3 -0
- data/lib/tartan/test/wiki-test.rb +8 -9
- data/lib/tartan/wikilink/wikilink.yml +2 -4
- data/test/test-combo.yml +1 -1
- data/test/test-markdown-and-wikilink.rb +2 -2
- data/test/test-markdown-table-attribute.rb +22 -0
- data/test/test-markdown-table-attribute.yml +86 -0
- data/test/test-markdown.yml +68 -5
- data/test/test-tables.yml +5 -43
- data/test/test-wikilink.yml +5 -1
- data/test/wikilink-test-helper.rb +1 -1
- metadata +7 -2
data/History.txt
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
= 0.2.1 2007-06-13 (r208)
|
2
|
+
* removed class support from tables and added a general purpose attribute mechanism
|
3
|
+
* Generalized the output types so you can pass a list of output types instead of just one and the parser will try to use them in order. This was done to support Informl where dbhtml is used for specific cases but html is the default.
|
4
|
+
* added failing test HeadingInsideDiv
|
5
|
+
* Cleaned up wiki link rules to use terser regular expressions. Changed wikilink helper to not strip spaces since the parsing rules should now be doing it.
|
6
|
+
* Get "new" Markdown <div markdown="1"> markup to work such that stuff inside the div is parsed as Markdown text (normally it isn't).
|
7
|
+
* Fixed problem with rake where failing tests caused subsequent tests not to be run.
|
8
|
+
* Fixed wiki-link rules so that links with text followed by other links will keep to themselves.
|
9
|
+
|
10
|
+
= 0.2.0 2007-05-16 (r197)
|
11
|
+
* Added tests to check for paragraph behavior with initial spaces and updated wiki rules to behave correctly.
|
12
|
+
* Added tests for: combo test
|
13
|
+
* Allow white space on "blank" lines before bullet lists.
|
14
|
+
* Fixed bug where backquoted wikilinks weren't being place into the text verbatim. Added test from Informl.
|
15
|
+
* Created test files to allow testing of the interaction between markdown and wikilinks.
|
16
|
+
* removed :db cases
|
17
|
+
* Changes to the test framework to allow sub-classing to override what parser is used and where the source of the parsing comes from. In particular, used to allow the source to be the HTML instead of the wiki text for the db test cases.
|
18
|
+
* added Markdown test case for a break in a list which as sub bullets
|
19
|
+
* Added tests for tables in code blocks and code span mark-up. This required the addition of a new test file for rule interation. Fixed table definition to allow tests to pass.
|
20
|
+
* Added a test case for embedded bullet lists.
|
21
|
+
* Fixed problem with parser rules for Markdown. There was a stray subparse rule that was causing havoc.
|
22
|
+
* Fixed problems in links and list items starting with numbers and asterisks.
|
23
|
+
* Added test so check for more list problems in Markdown.
|
24
|
+
* Added tests to record cases found using the Informl wiki.
|
25
|
+
* Updated Rakefile to allow use when version number is not set correctly.
|
26
|
+
* Updated to use Hoe.
|
27
|
+
* Changed some 'require' structures to avoid multiple loads of files.
|
28
|
+
* Put Tartan parser into module based name space. Readme updated to cover changes.
|
29
|
+
* Strip out html scripts in the span context.
|
30
|
+
* Added select and option to the sets of span and block html tags.
|
31
|
+
|
32
|
+
Fixed problem with multiple embedded bullet-lists.
|
1
33
|
= 0.1.2 2007-01-22 (r181)
|
2
34
|
* Refactored for "Tartan::" name space
|
3
35
|
* Strip out html scripts in the span context.
|
data/Manifest.txt
CHANGED
@@ -13,6 +13,8 @@ lib/core_ext/module.rb
|
|
13
13
|
lib/core_ext/regexp.rb
|
14
14
|
lib/core_ext/symbolize.rb
|
15
15
|
lib/tartan.rb
|
16
|
+
lib/tartan/attribute/attribute.yml
|
17
|
+
lib/tartan/attribute/rules.rb
|
16
18
|
lib/tartan/markdown.rb
|
17
19
|
lib/tartan/markdown/markdown.yml
|
18
20
|
lib/tartan/markdown/rules.rb
|
@@ -29,6 +31,8 @@ test/test-combo.yml
|
|
29
31
|
test/test-hash.rb
|
30
32
|
test/test-markdown-and-wikilink.rb
|
31
33
|
test/test-markdown-and-wikilink.yml
|
34
|
+
test/test-markdown-table-attribute.rb
|
35
|
+
test/test-markdown-table-attribute.yml
|
32
36
|
test/test-markdown.rb
|
33
37
|
test/test-markdown.yml
|
34
38
|
test/test-match-data.rb
|
data/Rakefile
CHANGED
@@ -18,6 +18,8 @@ def version
|
|
18
18
|
return nil
|
19
19
|
end
|
20
20
|
|
21
|
+
VERSION=version
|
22
|
+
|
21
23
|
def name
|
22
24
|
"tartan"
|
23
25
|
end
|
@@ -54,18 +56,28 @@ def rdoc_extra
|
|
54
56
|
end
|
55
57
|
|
56
58
|
def test_files
|
57
|
-
FileList['test/test*.rb']
|
59
|
+
files = FileList['test/test*.rb']
|
60
|
+
files.collect do |f|
|
61
|
+
f.match(/^test\/test[-_]?(.*?)\.rb/)[1]
|
62
|
+
end
|
58
63
|
end
|
59
64
|
|
60
65
|
namespace :test do
|
66
|
+
|
61
67
|
test_files.each do |file|
|
62
|
-
|
63
|
-
|
64
|
-
|
68
|
+
desc "Run #{file} tests"
|
69
|
+
task (file.to_sym) {ruby "-w -I test test/test-#{file}.rb"}
|
70
|
+
end
|
71
|
+
|
72
|
+
task :all do
|
73
|
+
test_files.each do |test|
|
74
|
+
system("ruby -w -I test test/test-#{test}.rb")
|
75
|
+
end
|
76
|
+
|
65
77
|
end
|
66
78
|
end
|
67
79
|
|
68
|
-
task :default => [:
|
80
|
+
task :default => ["test:all"]
|
69
81
|
|
70
82
|
task :version_check do
|
71
83
|
if version.nil?
|
@@ -0,0 +1,39 @@
|
|
1
|
+
block:
|
2
|
+
- title: grabAttribute
|
3
|
+
# after: main_block
|
4
|
+
before: paragraph
|
5
|
+
match: /^( {0,3}\{\*?:.*?\}\s*)$/
|
6
|
+
|
7
|
+
- title: tableWithAttribute
|
8
|
+
before: table
|
9
|
+
html:
|
10
|
+
start_mark: "<table>\n"
|
11
|
+
end_mark: </table>
|
12
|
+
after: html_comment
|
13
|
+
match: |-
|
14
|
+
/^[ ]{0,3} (?:\[[|!].*?\|\])
|
15
|
+
\s*(?:\{\*?:.*?\})?\s*
|
16
|
+
(?:(?:\[[|!].*?\|\])\s*(?:\{\*?:.*?\})?\s*)*/mx
|
17
|
+
subparse: table
|
18
|
+
|
19
|
+
- rescan
|
20
|
+
|
21
|
+
- title: rowAttribute
|
22
|
+
match: /<(li)(.*?)> ((?:.(?!<\1))*?) \s*\{\*:\s*((?:\w+=".*?")(?:\s+\w+=".*?")*)\s*\}[ ]*/mx
|
23
|
+
html:
|
24
|
+
replace: '<\1\2 \4>\3'
|
25
|
+
|
26
|
+
- title: attributeInsideAtEnd
|
27
|
+
match: /<(\w+)(.*?)>((?:.(?!<\1))*?)[ ]*\{:\s*((?:\w+=".*?")(?:\s+\w+=".*?")*)\s*\}[ ]*<\/\1>/mx
|
28
|
+
html:
|
29
|
+
replace: '<\1\2 \4>\3</\1>'
|
30
|
+
|
31
|
+
- title: attributeAfterBlock
|
32
|
+
match: /<(\w+)(.*?)>((?:.(?!<\1))*?)<\/\1>\s*\n[ ]*\{:\s*((?:\w+=".*?")(?:\s+\w+=".*?")*)\s*\}[ ]*(\n)?/mx
|
33
|
+
html:
|
34
|
+
replace: '<\1\2 \4>\3</\1>\5'
|
35
|
+
|
36
|
+
- title: attributeAfter
|
37
|
+
match: /<(\w+)(.*?)>((?:.(?!<\1))*?)<\/\1>\s*\{:\s*((?:\w+=".*?")(?:\s+\w+=".*?")*)\s*\}/mx
|
38
|
+
html:
|
39
|
+
replace: '<\1\2 \4>\3</\1>'
|
@@ -59,7 +59,7 @@ span:
|
|
59
59
|
/ <\/?
|
60
60
|
(?:span|cite|del|em|strong|dfn|code|samp|kbd|var|abbr
|
61
61
|
|acronym|b|i|font|a|img|object|tt|big|small|strike|s|u
|
62
|
-
|sup|sub|q|select|option)
|
62
|
+
|sup|sub|q|select|option|div)
|
63
63
|
(:?\s+[^\s>][^>]*?)?
|
64
64
|
>/x
|
65
65
|
html:
|
@@ -404,6 +404,14 @@ block:
|
|
404
404
|
/ ^[ ]{0,3}<input.*?>/x
|
405
405
|
html: true
|
406
406
|
|
407
|
+
- title: block_markup_div
|
408
|
+
match: /^[ ]{0,3}<div[ ]*([ ].+?)?[ ]+markdown="?1"?[ ]*([ ].*?)?[ ]*>(.*?)^[ ]{0,3}<\/div>/mx
|
409
|
+
html:
|
410
|
+
start_mark: <div\1\2>
|
411
|
+
end_mark: </div>
|
412
|
+
subparse:
|
413
|
+
context: block
|
414
|
+
match_group: 3
|
407
415
|
- title: html_block
|
408
416
|
shelve: true
|
409
417
|
match: >
|
data/lib/tartan/table/table.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
block:
|
2
2
|
- title: table
|
3
3
|
html:
|
4
|
-
start_mark: "<table
|
4
|
+
start_mark: "<table>\n"
|
5
5
|
end_mark: </table>
|
6
6
|
after: html_comment
|
7
7
|
match: |-
|
8
|
-
/^[ ]{0,3} (?:\[
|
8
|
+
/^[ ]{0,3} (?:\[[|!](?:.*?)\|\])
|
9
9
|
(?:\s*)
|
10
10
|
(?:(?:\[[|!](?:.*?)\|\])(?:\s*))*/mx
|
11
11
|
subparse: table
|
12
12
|
table:
|
13
13
|
- title: spanrow
|
14
|
-
match: "/\[(
|
14
|
+
match: "/\[([|!]\s*.*?\s*\|)\](?:\s*)/"
|
15
15
|
subparse:
|
16
16
|
match_group: 1
|
17
17
|
context: span_table_row
|
@@ -19,7 +19,7 @@ table:
|
|
19
19
|
start_mark: <tr>
|
20
20
|
end_mark: "</tr>\n"
|
21
21
|
- title: blockrow
|
22
|
-
match: "/\[(
|
22
|
+
match: "/\[([|!]\s*.*?\s*\|)\](?:\s*)/m"
|
23
23
|
subparse:
|
24
24
|
match_group: 1
|
25
25
|
context: block_table_row
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#$Id: wiki-test.rb
|
1
|
+
#$Id: wiki-test.rb 207 2007-06-04 15:45:31Z bitherder $
|
2
2
|
|
3
3
|
require 'test/unit'
|
4
4
|
require 'yaml'
|
@@ -16,8 +16,6 @@ class WikiTestCases
|
|
16
16
|
# it into a single element array
|
17
17
|
testfiles = testfiles.to_a
|
18
18
|
|
19
|
-
targests = targets.to_a
|
20
|
-
|
21
19
|
Class.new Test::Unit::TestCase do
|
22
20
|
|
23
21
|
define_method 'parserClass' do
|
@@ -81,15 +79,16 @@ class WikiTestCases
|
|
81
79
|
title = doc['title'] ? doc['title'] : (sequence += 1).to_s
|
82
80
|
|
83
81
|
targets.each do |target|
|
84
|
-
|
85
|
-
|
82
|
+
if target.kind_of? Array
|
83
|
+
target = target.find {|t| doc[t.to_s]}
|
84
|
+
end
|
86
85
|
|
87
|
-
next unless doc[
|
86
|
+
next unless doc[target.to_s]
|
88
87
|
|
89
|
-
define_method "test_#{
|
90
|
-
test_parser doc, options.dup, target,
|
88
|
+
define_method "test_#{target.to_s}_" + title do
|
89
|
+
test_parser doc, options.dup, target.to_sym, target.to_s
|
91
90
|
end # define_method
|
92
|
-
end #
|
91
|
+
end # targets.each
|
93
92
|
end # YAML::load_documents
|
94
93
|
end # testfiles.each
|
95
94
|
end # Class.new
|
@@ -1,9 +1,7 @@
|
|
1
1
|
span:
|
2
2
|
- title: wikilinkWithText
|
3
3
|
after: code_done
|
4
|
-
match: '
|
5
|
-
# match: '/\[\[ ((?: . (?! \]\] | \| ) )+.) \| (.*?)\]\] /x'
|
6
|
-
# match: "/\[\[([^\]|]+?)[|]([^\]]*)\]\]/"
|
4
|
+
match: '/\[\[ \s* ((?: . (?!\]\]))+?) \s* \| \s* (.*?) \s* \]\] /x'
|
7
5
|
shelve: true
|
8
6
|
subparse:
|
9
7
|
context: span
|
@@ -14,7 +12,7 @@ span:
|
|
14
12
|
|
15
13
|
- title: wikilink
|
16
14
|
after: wikilinkWithText
|
17
|
-
match: "/\[\[(
|
15
|
+
match: "/\[\[\s*(.+?)\s*\]\]/"
|
18
16
|
shelve: true
|
19
17
|
html:
|
20
18
|
replace: "#{wiki_link_tag(\1)}\1</a>"
|
data/test/test-combo.yml
CHANGED
@@ -11,7 +11,7 @@ in: '`[|bob||jim|]`'
|
|
11
11
|
html: |-
|
12
12
|
<p><code>[|bob||jim|]</code></p>
|
13
13
|
---
|
14
|
-
title:
|
14
|
+
title: ExclamationInTable_KNOWNtoFAIL
|
15
15
|
in: "[| [[Blog]] (new!) |]"
|
16
16
|
html: |-
|
17
17
|
<table class=""><tr><td><a class="existing" href="/prefix/Blog">Blog</a> (new!)</td></tr></table>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#$Id: test-markdown-and-wikilink.rb
|
2
|
+
#$Id: test-markdown-and-wikilink.rb 204 2007-05-17 14:36:01Z bitherder $
|
3
3
|
|
4
4
|
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
5
5
|
|
6
6
|
require 'tartan'
|
7
7
|
require 'tartan/wikilink/rules'
|
8
8
|
require 'tartan/test/wiki-test'
|
9
|
-
require 'tartan/
|
9
|
+
require 'tartan/markdown'
|
10
10
|
require 'wikilink-test-helper'
|
11
11
|
|
12
12
|
module Tartan
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#$Id: test-markdown-table-attribute.rb 208 2007-06-04 20:10:12Z alpinegizmo $
|
3
|
+
|
4
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
5
|
+
|
6
|
+
require 'tartan'
|
7
|
+
require 'tartan/markdown'
|
8
|
+
require 'tartan/table/rules'
|
9
|
+
require 'tartan/attribute/rules'
|
10
|
+
require 'tartan/test/wiki-test'
|
11
|
+
|
12
|
+
module Tartan
|
13
|
+
module Attribute
|
14
|
+
class Parser < Tartan::Parser
|
15
|
+
include Tartan::Markdown::Rules
|
16
|
+
include Tartan::Table::Rules
|
17
|
+
include Tartan::Attribute::Rules
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
cases = WikiTestCases.new(Tartan::Attribute::Parser, "test-markdown-table-attribute.yml")
|
@@ -0,0 +1,86 @@
|
|
1
|
+
title: ParagraphWithAttribute
|
2
|
+
in: |2-
|
3
|
+
abc
|
4
|
+
{: a="v" b="x y"}
|
5
|
+
html: |-
|
6
|
+
<p a="v" b="x y">abc</p>
|
7
|
+
---
|
8
|
+
title: ParagraphWithNonquotedAttribute
|
9
|
+
in: |2-
|
10
|
+
abc
|
11
|
+
{: a=v}
|
12
|
+
html: |-
|
13
|
+
<p>abc</p>
|
14
|
+
{: a=v}
|
15
|
+
---
|
16
|
+
title: EmWithAttribute
|
17
|
+
in: |2-
|
18
|
+
*abc {: a="v"}*
|
19
|
+
html: |-
|
20
|
+
<p><em a="v">abc</em></p>
|
21
|
+
---
|
22
|
+
title: BulletListElemWithAttribute
|
23
|
+
in: |2-
|
24
|
+
* a
|
25
|
+
* b {: id="bar"}
|
26
|
+
* c
|
27
|
+
html: |-
|
28
|
+
<ul>
|
29
|
+
<li>a</li>
|
30
|
+
<li id="bar">b</li>
|
31
|
+
<li>c</li>
|
32
|
+
</ul>
|
33
|
+
---
|
34
|
+
title: BulletListWithAttribute
|
35
|
+
in: |2-
|
36
|
+
* a
|
37
|
+
* b
|
38
|
+
* c
|
39
|
+
|
40
|
+
{: class="mylist"}
|
41
|
+
html: |-
|
42
|
+
<ul class="mylist">
|
43
|
+
<li>a</li>
|
44
|
+
<li>b</li>
|
45
|
+
<li>c</li>
|
46
|
+
</ul>
|
47
|
+
---
|
48
|
+
title: BulletParagraphWithAttribute
|
49
|
+
in: |2-
|
50
|
+
* a
|
51
|
+
|
52
|
+
* b {*: id="bar"}
|
53
|
+
|
54
|
+
* c
|
55
|
+
html: |-
|
56
|
+
<ul>
|
57
|
+
<li><p>a</p></li>
|
58
|
+
<li id="bar"><p>b</p></li>
|
59
|
+
<li><p>c</p></li>
|
60
|
+
</ul>
|
61
|
+
---
|
62
|
+
title: TableRowWithAttribute
|
63
|
+
in: |2-
|
64
|
+
[! one |! two |]
|
65
|
+
[| aaa || bbb |] {: class="dark"}
|
66
|
+
[| xyz || 123 |]
|
67
|
+
html: |-
|
68
|
+
<table>
|
69
|
+
<tr><th>one</th><th>two</th></tr>
|
70
|
+
<tr class="dark"><td>aaa</td><td>bbb</td></tr>
|
71
|
+
<tr><td>xyz</td><td>123</td></tr>
|
72
|
+
</table>
|
73
|
+
---
|
74
|
+
title: TableWithAttribute
|
75
|
+
in: |2-
|
76
|
+
[! one |! two |]
|
77
|
+
[| aaa || bbb |]
|
78
|
+
[| xyz || 123 |]
|
79
|
+
|
80
|
+
{: class="sortable"}
|
81
|
+
html: |-
|
82
|
+
<table class="sortable">
|
83
|
+
<tr><th>one</th><th>two</th></tr>
|
84
|
+
<tr><td>aaa</td><td>bbb</td></tr>
|
85
|
+
<tr><td>xyz</td><td>123</td></tr>
|
86
|
+
</table>
|
data/test/test-markdown.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#$Id: test-markdown.yml
|
1
|
+
#$Id: test-markdown.yml 206 2007-05-26 18:40:44Z alpinegizmo $
|
2
2
|
---
|
3
3
|
title: OneParagraph
|
4
4
|
in: "abc\ndef\nxyz"
|
@@ -789,7 +789,7 @@ title: HtmlBlockquoteFalseBold
|
|
789
789
|
in: <blockquote>An **important** block quote.</blockquote>
|
790
790
|
html: <blockquote>An **important** block quote.</blockquote>
|
791
791
|
---
|
792
|
-
title:
|
792
|
+
title: HtmlBlockquoteDouble_KNOWNtoFAIL
|
793
793
|
in: <blockquote>A <blockquote>block</blockquote> **quote**.</blockquote>
|
794
794
|
html: <blockquote>A <blockquote>block</blockquote> **quote**.</blockquote>
|
795
795
|
---
|
@@ -1244,7 +1244,7 @@ html: |-
|
|
1244
1244
|
<li><em>etc</em></li>
|
1245
1245
|
</ul>
|
1246
1246
|
---
|
1247
|
-
title:
|
1247
|
+
title: BulletListInBulletList_KNOWNtoFAIL
|
1248
1248
|
in: |-
|
1249
1249
|
* A
|
1250
1250
|
|
@@ -1262,7 +1262,7 @@ html: |-
|
|
1262
1262
|
<li><p>B</p></li>
|
1263
1263
|
</ul>
|
1264
1264
|
---
|
1265
|
-
title:
|
1265
|
+
title: CompactBulletListWithLastLineSpaced_KNOWNtoFAIL
|
1266
1266
|
in: |-
|
1267
1267
|
* a
|
1268
1268
|
* b
|
@@ -1381,4 +1381,67 @@ html: |2
|
|
1381
1381
|
5xxxx
|
1382
1382
|
</code></pre>
|
1383
1383
|
<p>6xxxx</p>
|
1384
|
-
|
1384
|
+
---
|
1385
|
+
title: SpecialDivWMarkup
|
1386
|
+
in: |2
|
1387
|
+
<div markdown="1">
|
1388
|
+
This is a *very* good paragraph.
|
1389
|
+
</div>
|
1390
|
+
html: |2
|
1391
|
+
<div>
|
1392
|
+
<p>This is a <em>very</em> good paragraph.</p>
|
1393
|
+
</div>
|
1394
|
+
---
|
1395
|
+
title: SpecialDivWMarkupNumberNotQuoted
|
1396
|
+
in: |2
|
1397
|
+
<div markdown=1>
|
1398
|
+
This is a *very* good paragraph.
|
1399
|
+
</div>
|
1400
|
+
html: |2
|
1401
|
+
<div>
|
1402
|
+
<p>This is a <em>very</em> good paragraph.</p>
|
1403
|
+
</div>
|
1404
|
+
---
|
1405
|
+
title: SpecialDivWMarkupClassLeft
|
1406
|
+
in: |2
|
1407
|
+
<div class="myclass" markdown="1">
|
1408
|
+
This is a *very* good paragraph.
|
1409
|
+
</div>
|
1410
|
+
html: |2
|
1411
|
+
<div class="myclass">
|
1412
|
+
<p>This is a <em>very</em> good paragraph.</p>
|
1413
|
+
</div>
|
1414
|
+
---
|
1415
|
+
title: SpecialDivWMarkupClassRight
|
1416
|
+
in: |2
|
1417
|
+
<div markdown="1" class="myclass" >
|
1418
|
+
This is a *very* good paragraph.
|
1419
|
+
</div>
|
1420
|
+
html: |2
|
1421
|
+
<div class="myclass">
|
1422
|
+
<p>This is a <em>very</em> good paragraph.</p>
|
1423
|
+
</div>
|
1424
|
+
---
|
1425
|
+
title: SpecialDivWMarkupIndented
|
1426
|
+
in: |2
|
1427
|
+
<div markdown="1" class="myclass" >
|
1428
|
+
This is a *very* good paragraph.
|
1429
|
+
</div>
|
1430
|
+
html: |2
|
1431
|
+
<div class="myclass">
|
1432
|
+
<p>This is a <em>very</em> good paragraph.</p>
|
1433
|
+
</div>
|
1434
|
+
---
|
1435
|
+
title: PlainDivInSpan
|
1436
|
+
in: "my text <div>is special to *me*</div>"
|
1437
|
+
html: "<p>my text <div>is special to <em>me</em></div></p>"
|
1438
|
+
---
|
1439
|
+
title: HeadingInsideDiv_KNOWNtoFAIL
|
1440
|
+
in: |2-
|
1441
|
+
<div markdown="1">
|
1442
|
+
## Title
|
1443
|
+
</div>
|
1444
|
+
html: |
|
1445
|
+
<div>
|
1446
|
+
<h2>Title</h2>
|
1447
|
+
</div>
|
data/test/test-tables.yml
CHANGED
@@ -3,31 +3,24 @@
|
|
3
3
|
title: OneLineTable
|
4
4
|
in: "[|bob||jim|]"
|
5
5
|
html: |-
|
6
|
-
<table
|
6
|
+
<table>
|
7
7
|
<tr><td>bob</td><td>jim</td></tr>
|
8
8
|
</table>
|
9
9
|
---
|
10
10
|
title: OneLineTableWithBarInCell
|
11
11
|
in: "[|bob|mike||jim|]"
|
12
12
|
html: |-
|
13
|
-
<table
|
13
|
+
<table>
|
14
14
|
<tr><td>bob|mike</td><td>jim</td></tr>
|
15
15
|
</table>
|
16
16
|
---
|
17
17
|
title: OneLineHeaderTable
|
18
18
|
in: "[!bob|!jim|]"
|
19
19
|
html: |-
|
20
|
-
<table
|
20
|
+
<table>
|
21
21
|
<tr><th>bob</th><th>jim</th></tr>
|
22
22
|
</table>
|
23
23
|
---
|
24
|
-
title: OneLineTableWithClass
|
25
|
-
in: "[class|bob||jim|]"
|
26
|
-
html: |-
|
27
|
-
<table class="class">
|
28
|
-
<tr><td>bob</td><td>jim</td></tr>
|
29
|
-
</table>
|
30
|
-
---
|
31
24
|
title: OneRowMultipleLines
|
32
25
|
in: |-
|
33
26
|
[|
|
@@ -36,7 +29,7 @@ in: |-
|
|
36
29
|
jim
|
37
30
|
|]
|
38
31
|
html: |-
|
39
|
-
<table
|
32
|
+
<table>
|
40
33
|
<tr><td><p>bob</p></td><td><p>jim</p></td></tr>
|
41
34
|
</table>
|
42
35
|
---
|
@@ -45,38 +38,7 @@ in: |-
|
|
45
38
|
[|first||last|]
|
46
39
|
[|billy||bob|]
|
47
40
|
html: |-
|
48
|
-
<table
|
49
|
-
<tr><td>first</td><td>last</td></tr>
|
50
|
-
<tr><td>billy</td><td>bob</td></tr>
|
51
|
-
</table>
|
52
|
-
---
|
53
|
-
title: TwoLineTableWithClass
|
54
|
-
in: |-
|
55
|
-
[class|first||last|]
|
56
|
-
[|billy||bob|]
|
57
|
-
html: |-
|
58
|
-
<table class="class">
|
41
|
+
<table>
|
59
42
|
<tr><td>first</td><td>last</td></tr>
|
60
43
|
<tr><td>billy</td><td>bob</td></tr>
|
61
44
|
</table>
|
62
|
-
---
|
63
|
-
title: TwoLineTableWithClassAndHeaders
|
64
|
-
in: |-
|
65
|
-
[class!first|!last|]
|
66
|
-
[|billy||bob|]
|
67
|
-
html: |-
|
68
|
-
<table class="class">
|
69
|
-
<tr><th>first</th><th>last</th></tr>
|
70
|
-
<tr><td>billy</td><td>bob</td></tr>
|
71
|
-
</table>
|
72
|
-
---
|
73
|
-
title: TwoOneLineTablesWithClass
|
74
|
-
in: |-
|
75
|
-
[class1|joe||sally|]
|
76
|
-
[class2|bob||jim|]
|
77
|
-
html: |-
|
78
|
-
<table class="class1">
|
79
|
-
<tr><td>joe</td><td>sally</td></tr>
|
80
|
-
</table><table class="class2">
|
81
|
-
<tr><td>bob</td><td>jim</td></tr>
|
82
|
-
</table>
|
data/test/test-wikilink.yml
CHANGED
@@ -22,4 +22,8 @@ html: '<p><a class="existing" href="/prefix/Page+Name">Link <em>Body</em></a></p
|
|
22
22
|
---
|
23
23
|
title: TwoLinksOnALineWLinkText
|
24
24
|
in: "[[Page one]] [[Page two|Second]] -- some other text"
|
25
|
-
html: '<p><a class="existing" href="/prefix/Page+one">Page one</a> <a class="existing" href="/prefix/Page+two">Second</a> -- some other text</p>'
|
25
|
+
html: '<p><a class="existing" href="/prefix/Page+one">Page one</a> <a class="existing" href="/prefix/Page+two">Second</a> -- some other text</p>'
|
26
|
+
---
|
27
|
+
title: TwoLinksOnALineWLinkTextWithSquare
|
28
|
+
in: "[[ [some left text] | [some right text] ]]"
|
29
|
+
html: '<p><a class="existing" href="/prefix/[some+left+text]">[some right text]</a></p>'
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: tartan
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.2.1
|
7
|
+
date: 2007-06-13 00:00:00 +02:00
|
8
8
|
summary: A library for building text parsers
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -44,6 +44,8 @@ files:
|
|
44
44
|
- lib/core_ext/regexp.rb
|
45
45
|
- lib/core_ext/symbolize.rb
|
46
46
|
- lib/tartan.rb
|
47
|
+
- lib/tartan/attribute/attribute.yml
|
48
|
+
- lib/tartan/attribute/rules.rb
|
47
49
|
- lib/tartan/markdown.rb
|
48
50
|
- lib/tartan/markdown/markdown.yml
|
49
51
|
- lib/tartan/markdown/rules.rb
|
@@ -60,6 +62,8 @@ files:
|
|
60
62
|
- test/test-hash.rb
|
61
63
|
- test/test-markdown-and-wikilink.rb
|
62
64
|
- test/test-markdown-and-wikilink.yml
|
65
|
+
- test/test-markdown-table-attribute.rb
|
66
|
+
- test/test-markdown-table-attribute.yml
|
63
67
|
- test/test-markdown.rb
|
64
68
|
- test/test-markdown.yml
|
65
69
|
- test/test-match-data.rb
|
@@ -75,6 +79,7 @@ test_files:
|
|
75
79
|
- test/test-combo.rb
|
76
80
|
- test/test-hash.rb
|
77
81
|
- test/test-markdown-and-wikilink.rb
|
82
|
+
- test/test-markdown-table-attribute.rb
|
78
83
|
- test/test-markdown.rb
|
79
84
|
- test/test-match-data.rb
|
80
85
|
- test/test-readme-example.rb
|