Changeset 271
- Timestamp:
- 02/02/08 21:04:19 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ingy/Document-Tools/lib/Document/Parser/Creole.pm
r255 r271 5 5 my $all_blocks = [ 6 6 'h6', 'h5', 'h4', 'h3', 'h2', 'h1', 7 'ul', 'ol', ' in', 'p',7 'ul', 'ol', 'hr', 'table', 'p', 8 8 ]; 9 9 10 10 my $all_phrases = [ 11 ' tt', 'b', 'i', 's',11 'b', 'i', 'tt', 'br', 12 12 ]; 13 13 … … 93 93 phrases =>$all_phrases, 94 94 }, 95 hr => { 96 match => qr/\ *----\ *\n/, 97 }, 95 98 96 in => {97 match => qr/^( # Block must start at beginning98 (?:>+.*\n)+ # Capture lines starting with '>'99 )(?:\s*\n)?/x, # Eat trailing empty lines100 blocks => $all_blocks,101 filter => sub { s/^> *//mg },102 },103 99 b => { 104 100 phrases => $all_phrases, 105 match => [re_huggy('\*'), re_bracket('\*')],101 match => regexp('\*\*'), 106 102 }, 107 103 i => { 108 104 phrases => $all_phrases, 109 match => [re_huggy('_'), re_bracket('_')], 110 }, 111 s => { 112 phrases => $all_phrases, 113 match => [re_huggy('-'), re_bracket('-')], 105 match => regexp('\/\/'), 114 106 }, 115 107 tt => { 116 phrases => $all_phrases, 117 match => [re_huggy('`'), re_bracket('`')], 108 match => regexp('{{{', '}}}'), 109 }, 110 br => { 111 match => qr/\\\\/, 118 112 }, 119 113 };
