@@ -33,15 +33,15 @@ class Text_Wiki_Parse_Bibliography extends Text_Wiki_Parse {
3333 public $ regex = null ;
3434
3535 function parse () {
36- $ regex = ' /
37- ^ # Start of line
38- \[\[bibliography # Tag name
39- (\s+[^\]]+)? # Parameters
40- \]\]
41- (.*?) # Contents
42- \[\[\/bibliography\]\] # End tag
43- [\s]*$ # Allow whitespace until end of the line
44- /smx ' ;
36+ $ regex = ' / ' .
37+ ' ^ ' . # Start of line
38+ ' \[\[bibliography ' . # Tag name
39+ ' (\s+[^\]]+)? ' . # Parameters
40+ ' \]\] ' .
41+ ' (.*?) ' . # Contents
42+ ' \[\[\/bibliography\]\] ' . # End tag
43+ ' [\s]*$ ' . # Allow whitespace until end of the line
44+ ' /smx ' ;
4545 $ this ->wiki ->source = preg_replace_callback ($ regex ,
4646 array (&$ this , 'process ' ), $ this ->wiki ->source , 1 );
4747 }
@@ -57,15 +57,16 @@ function process(&$matches) {
5757 // parse the "inner" manually inserting delimiters
5858 $ bi = $ this ->wiki ->parseObj ['Bibitem ' ];
5959
60- $ inside = preg_replace_callback ("/
61- ^ # Start of line
62- :\s? # Colon, then optional whitespace
63- ([a-z0-9]+) # Lowercase alphanumeric bib item name
64- \s? # Optional whitespace
65- :\s # Colon then mandatory whitespace
66- (.*) # Rest of the line is the item definition
67- $ # End of line
68- /mix " ,
60+ $ inside = preg_replace_callback (
61+ '/ ' .
62+ '^ ' . # Start of line
63+ ':\s? ' . # Colon, then optional whitespace
64+ '([a-z0-9]+) ' . # Lowercase alphanumeric bib item name
65+ '\s? ' . # Optional whitespace
66+ ':\s ' . # Colon then mandatory whitespace
67+ '(.*) ' . # Rest of the line is the item definition
68+ '$ ' . # End of line
69+ '/mix ' ,
6970 array (&$ bi , 'process ' ), $ inner );
7071
7172 return "\n" . $ this ->wiki ->addToken ($ this ->rule , array (
0 commit comments