Changeset 605
- Timestamp:
- 2007-06-05 13:10:23 (2 years ago)
- Files:
-
- trunk/lib/parser/lib/rules/zazen.rb (modified) (1 diff)
- trunk/lib/parser/test/parser_test.rb (modified) (1 diff)
- trunk/lib/parser/test/zazen.yml (modified) (1 diff)
- trunk/test/helpers/basic.yml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/parser/lib/rules/zazen.rb
r512 r605 92 92 eat $& 93 93 # link inside the cms "":34 94 store @helper.make_link(:title=>$1,:id=>$2) 94 title, id = $1, $2 95 if id =~ /(.*)#(.*)/ 96 id, dash = $1, $2 97 dash = title if dash.blank? 98 end 99 store @helper.make_link(:title=>title,:id=>id,:dash=>dash) 95 100 else 96 101 flush @text[0..0] trunk/lib/parser/test/parser_test.rb
r599 r605 56 56 testfile :zafu, :zafu_asset, :zafu_insight, :zazen 57 57 def test_single 58 do_test('za fu', 'form')58 do_test('zazen', 'link_dash') 59 59 end 60 60 trunk/lib/parser/test/zazen.yml
r599 r605 123 123 src: '"":23' 124 124 res: '<p>[make_link id:|23| title:||]</p>' 125 125 126 link_dash: 127 src: '"hello":23#world of fame' 128 res: "<p>[make_link dash:|world| id:|23| title:|hello|] of fame</p>" 129 130 link_dash_same_as_title: 131 src: '"hello":23# I love you' 132 res: "<p>[make_link dash:|hello| id:|23| title:|hello|] I love you</p>" 133 126 134 wiki_link: 127 135 src: "why use ?ruby? ?" trunk/test/helpers/basic.yml
r599 r605 100 100 tem: "<%= node_link(:node=>@node, :text=>@node.ref_lang) %>" 101 101 res: "<a href='/oo/projects/cleanWater/page22.html'>en</a>" 102 102 103 103 link_tattr: 104 104 src: "<r:link tattr='ref_lang'/>" … … 139 139 res: "<a href='#node22'>status title</a>" 140 140 141 link_dash_name: 142 src: "<r:link dash='[name]'/>" 143 res: "<a href='#status'>status title</a>" 144 145 link_dash_in: 146 src: "<r:link dash='true' in='project' mode='tree'/>" 147 res: "<a href='...._tree.html#node44'>status title</a>" 148 149 link_dash_name_in: 150 src: "<r:link dash='[name]' in='parent'/>" 151 res: "<a href='...#status'>status title</a>" 152 141 153 anchor: 142 src: "<r:anchor/> "143 res: "<a name='node22'></a> "154 src: "<r:anchor/> <p do='[id]' anchor='[name]'>hello</p>" 155 res: "<a name='node22'></a> <p><a name='status'></a>33</p>" 144 156 145 157 show_title_anchor:
