Changeset 310 for lang/perl/Text-Nyarlax
- Timestamp:
- 09/30/07 16:16:58 (6 years ago)
- Location:
- lang/perl/Text-Nyarlax/trunk
- Files:
-
- 2 added
- 30 modified
-
lib/Text/Nyarlax/Parser/PRD.pm (modified) (3 diffs)
-
t/parser/01_PRD.t (modified) (1 diff)
-
t/parser/spec/abbreviation.tb (modified) (1 diff)
-
t/parser/spec/acronym.tb (modified) (1 diff)
-
t/parser/spec/blockdeleted.tb (added)
-
t/parser/spec/blockinserted.tb (added)
-
t/parser/spec/blocknotes.tb (modified) (1 diff)
-
t/parser/spec/blockquote.tb (modified) (4 diffs)
-
t/parser/spec/citation.tb (modified) (1 diff)
-
t/parser/spec/code.tb (modified) (1 diff)
-
t/parser/spec/comparison.tb (modified) (1 diff)
-
t/parser/spec/definition.tb (modified) (1 diff)
-
t/parser/spec/deleted.tb (modified) (1 diff)
-
t/parser/spec/embedding.tb (modified) (4 diffs)
-
t/parser/spec/emphasis.tb (modified) (1 diff)
-
t/parser/spec/escape.tb (modified) (2 diffs)
-
t/parser/spec/heading.tb (modified) (2 diffs)
-
t/parser/spec/hyperlink.tb (modified) (6 diffs)
-
t/parser/spec/inputcommand.tb (modified) (1 diff)
-
t/parser/spec/inputtext.tb (modified) (1 diff)
-
t/parser/spec/inserted.tb (modified) (1 diff)
-
t/parser/spec/keyboard.tb (modified) (1 diff)
-
t/parser/spec/list.tb (modified) (17 diffs)
-
t/parser/spec/notes.tb (modified) (1 diff)
-
t/parser/spec/paragraph.tb (modified) (2 diffs)
-
t/parser/spec/quote.tb (modified) (1 diff)
-
t/parser/spec/ruby.tb (modified) (2 diffs)
-
t/parser/spec/sample.tb (modified) (1 diff)
-
t/parser/spec/section.tb (modified) (6 diffs)
-
t/parser/spec/subscript.tb (modified) (1 diff)
-
t/parser/spec/superscript.tb (modified) (1 diff)
-
t/parser/spec/variable.tb (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Text-Nyarlax/trunk/lib/Text/Nyarlax/Parser/PRD.pm
r295 r310 104 104 | BlockQuote 105 105 | BlockNotes 106 | BlockEdited[ marker => quotemeta('+'), name => 'BlockInserted' ] 107 | BlockEdited[ marker => quotemeta('-'), name => 'BlockDeleted' ] 106 108 | Paragraph 107 109 … … 213 215 my $elm = element( $item[0] ); 214 216 $elm->push_content( @{ $item{'Root'} } ); 217 $return = $elm; 218 } 219 220 BlockEdited : /(?:$arg{'marker'}){3}/ Blank Text(?) Blank /\n/ 221 Root 222 /(?:$arg{'marker'}){3}/ Blank DateTime(?) Blank /\n/ 223 { 224 my $elm = element( $arg{'name'} ); 225 $elm->push_content( @{ $item{'Root'} } ); 226 $elm->attr->{'title'} = $item{'Text(?)'}->[0] 227 if ( $item{'Text(?)'}->[0] ); 228 $elm->attr->{'datetime'} = $item{'DateTime(?)'}->[0] 229 if ( $item{'DateTime(?)'}->[0] ); 215 230 $return = $elm; 216 231 } … … 387 402 Identifier : /[a-zA-Z]+/ 388 403 URI : /$RE{'URI'}/ 404 DateTime : /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[\-+]\d{2}:\d{2}/ 389 405 __GRAMMER__ 390 406 -
lang/perl/Text-Nyarlax/trunk/t/parser/01_PRD.t
r88 r310 7 7 set_test_elements; 8 8 9 delimiters('###', '@@@'); 10 9 11 run_test_parse( in => 'out' ); -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/abbreviation.tb
r88 r310 1 ===Abbreviation2 ---in1 ### Abbreviation 2 @@@ in 3 3 ((HTML=Hyper Text Markup Language)) 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/acronym.tb
r88 r310 1 ===Acronym2 ---in1 ### Acronym 2 @@@ in 3 3 ((LAN:=Local Area Network)) 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/blocknotes.tb
r278 r310 1 ===BlockNotes2 ---in1 ### BlockNotes 2 @@@ in 3 3 ((( 4 4 text text text 5 5 text text text 6 6 ))) 7 ---out7 @@@ out 8 8 name: BlockNotes 9 9 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/blockquote.tb
r260 r310 1 ===simple BlockQuote2 ---in1 ### simple BlockQuote 2 @@@ in 3 3 4 4 >>> … … 7 7 <<< 8 8 9 ---out9 @@@ out 10 10 name: BlockQuote 11 11 content: … … 18 18 text text text 19 19 20 ===BlockQuote with Attributes21 ---in20 ### BlockQuote with Attributes 21 @@@ in 22 22 23 23 >>> document title … … 26 26 <<< http://example.com/foo/bar.html 27 27 28 ---out28 @@@ out 29 29 name: BlockQuote 30 30 attr: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/citation.tb
r88 r310 1 ===Citation2 ---in1 ### Citation 2 @@@ in 3 3 foo bar >>baz<< 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/code.tb
r88 r310 1 ===quote2 ---in1 ### quote 2 @@@ in 3 3 `$self->parser->parse( $text )` 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/comparison.tb
r88 r310 1 ===comparison2 ---in1 ### comparison 2 @@@ in 3 3 AAABBB//CCC/DDD//EEEFFF 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/definition.tb
r88 r310 1 ===Definition2 ---in1 ### Definition 2 @@@ in 3 3 AAABBB??CCC??DDD 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/deleted.tb
r88 r310 1 ===Deleted2 ---in1 ### Deleted 2 @@@ in 3 3 AAABBB--CCC--DDD 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/embedding.tb
r88 r310 1 ===simple Embedding2 ---in1 ### simple Embedding 2 @@@ in 3 3 {{name}} 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: … … 12 12 - "\n" 13 13 14 ===Embedding with arguments15 ---in14 ### Embedding with arguments 15 @@@ in 16 16 {{name:aaa}} 17 ---out17 @@@ out 18 18 name: Paragraph 19 19 content: … … 27 27 - "\n" 28 28 29 ===Embedding with Mluti-line30 ---in29 ### Embedding with Mluti-line 30 @@@ in 31 31 {{name: 32 32 foo: AAA … … 34 34 baz: CCC 35 35 }} 36 ---out36 @@@ out 37 37 name: Paragraph 38 38 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/emphasis.tb
r88 r310 1 ===emphasis2 ---in1 ### emphasis 2 @@@ in 3 3 AAABBBCCC**EEE*FFF** 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/escape.tb
r88 r310 1 ===Escape bracket2 ---in1 ### Escape bracket 2 @@@ in 3 3 AAA BBB CCC \\\(( DDD EEE ))\\\ 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: … … 9 9 - "AAA BBB CCC (( DDD EEE ))\n" 10 10 11 ===Escape one charactor12 ---in11 ### Escape one charactor 12 @@@ in 13 13 AAA BBB \"foo bar baz\" 14 ---out14 @@@ out 15 15 name: Paragraph 16 16 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/heading.tb
r89 r310 1 ===Heading2 ---in1 ### Heading 2 @@@ in 3 3 = heading = 4 ---out4 @@@ out 5 5 name: Section 6 6 content: … … 9 9 - heading 10 10 11 ===Heading with ID12 ---in11 ### Heading with ID 12 @@@ in 13 13 = heading = MyID 14 ---out14 @@@ out 15 15 name: Section 16 16 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/hyperlink.tb
r88 r310 1 ===PageLink2 ---in1 ### PageLink 2 @@@ in 3 3 [[PageName]] 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: … … 14 14 - "\n" 15 15 16 ===PageLink with title16 ### PageLink with title 17 17 [[title|PageName]] 18 ---out18 @@@ out 19 19 name: Paragraph 20 20 content: … … 28 28 - "\n" 29 29 30 ===InterWikiName31 ---in30 ### InterWikiName 31 @@@ in 32 32 [[WikiName[PageName]]] 33 ---out33 @@@ out 34 34 name: Paragraph 35 35 content: … … 44 44 - "\n" 45 45 46 ===InterWikiName with title47 ---in46 ### InterWikiName with title 47 @@@ in 48 48 [[title|WikiName[PageName]]] 49 ---out49 @@@ out 50 50 name: Paragraph 51 51 content: … … 60 60 - "\n" 61 61 62 ===HTTP link63 ---in62 ### HTTP link 63 @@@ in 64 64 [[http://example.com/foo/bar/]] 65 ---out65 @@@ out 66 66 name: Paragraph 67 67 content: … … 75 75 - "\n" 76 76 77 ===HTTP link with title78 ---in77 ### HTTP link with title 78 @@@ in 79 79 [[title|http://example.com/foo/bar/]] 80 ---out80 @@@ out 81 81 name: Paragraph 82 82 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/inputcommand.tb
r88 r310 1 ===InputCommand2 ---in1 ### InputCommand 2 @@@ in 3 3 [$prove -I lib t/*.t$] 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/inputtext.tb
r88 r310 1 ===InputText2 ---in1 ### InputText 2 @@@ in 3 3 AAABBB[|CCC|]DDD 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/inserted.tb
r88 r310 1 ===Inserted2 ---in1 ### Inserted 2 @@@ in 3 3 AAABBB++CCC++DDD 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/keyboard.tb
r88 r310 1 ===Keyboard2 ---in1 ### Keyboard 2 @@@ in 3 3 <[shift]> + <[c]> 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/list.tb
r251 r310 1 ===simple List2 ---in3 4 * item 5 * item 6 * item 7 8 ---out1 ### simple List 2 @@@ in 3 4 * item 5 * item 6 * item 7 8 @@@ out 9 9 name: UnorderedList 10 10 content: … … 19 19 - item 20 20 21 ===multi-line list22 ---in21 ### multi-line list 22 @@@ in 23 23 24 24 # text text text … … 29 29 text text text 30 30 31 ---out31 @@@ out 32 32 name: OrderedList 33 33 content: … … 48 48 text text text 49 49 50 ===inline-block List51 ---in50 ### inline-block List 51 @@@ in 52 52 53 53 * >> … … 61 61 * item 62 62 63 ---out63 @@@ out 64 64 name: UnorderedList 65 65 content: … … 85 85 - item 86 86 87 ===simple DefinitionList88 ---in87 ### simple DefinitionList 88 @@@ in 89 89 90 90 ? term … … 96 96 97 97 98 ---out98 @@@ out 99 99 name: DefinitionList 100 100 content: … … 123 123 124 124 125 ===multi-line DefinitionDescription126 ---in125 ### multi-line DefinitionDescription 126 @@@ in 127 127 128 128 ? text text text … … 132 132 133 133 134 ---out134 @@@ out 135 135 name: DefinitionList 136 136 content: … … 148 148 text text text 149 149 150 ===inline-block DefinitionList151 ---in150 ### inline-block DefinitionList 151 @@@ in 152 152 153 153 ? term … … 158 158 : description 159 159 160 ---out160 @@@ out 161 161 name: DefinitionList 162 162 content: … … 179 179 - description 180 180 181 ===simple nestring list182 ---in181 ### simple nestring list 182 @@@ in 183 183 184 184 * item … … 187 187 : description 188 188 189 ---out189 @@@ out 190 190 name: UnorderedList 191 191 content: … … 209 209 - description 210 210 211 ===multi-line nesting list212 ---in211 ### multi-line nesting list 212 @@@ in 213 213 214 214 # text text text … … 221 221 text text text 222 222 223 ---out223 @@@ out 224 224 name: OrderedList 225 225 content: … … 251 251 text text text 252 252 253 ===inline-block nesting list254 ---in253 ### inline-block nesting list 254 @@@ in 255 255 256 256 ? term … … 268 268 << 269 269 270 ---out270 @@@ out 271 271 name: DefinitionList 272 272 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/notes.tb
r88 r310 1 ===notes2 ---in1 ### notes 2 @@@ in 3 3 AAABBBCCC((( DDDEEE(FFF) ))) 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/paragraph.tb
r88 r310 1 ===simple paragraph2 ---in1 ### simple paragraph 2 @@@ in 3 3 text text text 4 4 text text text … … 6 6 text text text 7 7 text text text 8 ---out8 @@@ out 9 9 name: Paragraph 10 10 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/quote.tb
r88 r310 1 ===quote2 ---in1 ### quote 2 @@@ in 3 3 text"text"text 4 4 text"text"text 5 ---out5 @@@ out 6 6 name: Paragraph 7 7 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/ruby.tb
r88 r310 1 ===Simple Ruby2 ---in1 ### Simple Ruby 2 @@@ in 3 3 ((<HTML><Hyper Text Markup Language>)) 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: … … 17 17 - "\n" 18 18 19 ===Multi Ruby20 ---in19 ### Multi Ruby 20 @@@ in 21 21 ((<H|T|M|L><Hyper|Text|Markup|Language><Hyper|Text|Markup|Language>)) 22 ---out22 @@@ out 23 23 name: Paragraph 24 24 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/sample.tb
r88 r310 1 ===Sample2 ---in1 ### Sample 2 @@@ in 3 3 [!404 Not Found!] 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/section.tb
r140 r310 1 ===single Section2 ---in1 ### single Section 2 @@@ in 3 3 4 4 = heading = … … 7 7 paragraph paragraph paragraph 8 8 9 ---out9 @@@ out 10 10 name: Section 11 11 content: … … 21 21 paragraph paragraph paragraph 22 22 23 ===multi Section 124 ---in23 ### multi Section 1 24 @@@ in 25 25 26 26 = heading = … … 35 35 36 36 37 ---out37 @@@ out 38 38 name: Section 39 39 content: … … 60 60 61 61 62 ===multi Section 263 ---in62 ### multi Section 2 63 @@@ in 64 64 65 65 = heading 1 = … … 83 83 paragraph paragraph paragraph 84 84 85 ---out85 @@@ out 86 86 name: Section 87 87 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/subscript.tb
r88 r310 1 ===SubScript2 ---in1 ### SubScript 2 @@@ in 3 3 AAABBB__CCC__DDD 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/superscript.tb
r88 r310 1 ===SuperScript2 ---in1 ### SuperScript 2 @@@ in 3 3 AAABBB~~CCC~~DDD 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: -
lang/perl/Text-Nyarlax/trunk/t/parser/spec/variable.tb
r88 r310 1 ===Variable: string2 ---in1 ### Variable: string 2 @@@ in 3 3 {$ $string $} 4 ---out4 @@@ out 5 5 name: Paragraph 6 6 content: … … 14 14 - "\n" 15 15 16 ===Variable: number17 ---in16 ### Variable: number 17 @@@ in 18 18 {# 1000 #} 19 ---out19 @@@ out 20 20 name: Paragraph 21 21 content: … … 29 29 - "\n" 30 30 31 ===Variable: boolean32 ---in31 ### Variable: boolean 32 @@@ in 33 33 {? false ?} 34 ---out34 @@@ out 35 35 name: Paragraph 36 36 content: … … 44 44 - "\n" 45 45 46 ===Variable: reference47 ---in46 ### Variable: reference 47 @@@ in 48 48 {: \$string :} 49 ---out49 @@@ out 50 50 name: Paragraph 51 51 content: … … 59 59 - "\n" 60 60 61 ===Variable: pointer62 ---in61 ### Variable: pointer 62 @@@ in 63 63 {* *pointer *} 64 ---out64 @@@ out 65 65 name: Paragraph 66 66 content: … … 74 74 - "\n" 75 75 76 ===Variable: function77 ---in76 ### Variable: function 77 @@@ in 78 78 {& $class->method &} 79 ---out79 @@@ out 80 80 name: Paragraph 81 81 content: … … 89 89 - "\n" 90 90 91 ===Variable: array92 ---in91 ### Variable: array 92 @@@ in 93 93 {@ @array @} 94 ---out94 @@@ out 95 95 name: Paragraph 96 96 content: … … 104 104 - "\n" 105 105 106 ===Variable: hash107 ---in106 ### Variable: hash 107 @@@ in 108 108 {% %hash %} 109 ---out109 @@@ out 110 110 name: Paragraph 111 111 content: … … 119 119 - "\n" 120 120 121 ===Variable: structure122 ---in121 ### Variable: structure 122 @@@ in 123 123 {= structure =} 124 ---out124 @@@ out 125 125 name: Paragraph 126 126 content: … … 134 134 - "\n" 135 135 136 ===Variable: object137 ---in136 ### Variable: object 137 @@@ in 138 138 {+ {} +} 139 ---out139 @@@ out 140 140 name: Paragraph 141 141 content: … … 149 149 - "\n" 150 150 151 ===Variable: object152 ---in151 ### Variable: object 152 @@@ in 153 153 {+ {} +} 154 ---out154 @@@ out 155 155 name: Paragraph 156 156 content: … … 164 164 - "\n" 165 165 166 ===Variable: class167 ---in166 ### Variable: class 167 @@@ in 168 168 {! Foo.Bar.Baz !} 169 ---out169 @@@ out 170 170 name: Paragraph 171 171 content: … … 179 179 - "\n" 180 180 181 ===Variable: path182 ---in181 ### Variable: path 182 @@@ in 183 183 {path:/path/to/dir} 184 ---out184 @@@ out 185 185 name: Paragraph 186 186 content: … … 194 194 - "\n" 195 195 196 ===Variable: file197 ---in196 ### Variable: file 197 @@@ in 198 198 {file:filename.pl} 199 ---out199 @@@ out 200 200 name: Paragraph 201 201 content:
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)