Index: branches/new-installer/phase3/includes/installer/WebInstaller.php |
— | — | @@ -1596,7 +1596,11 @@ |
1597 | 1597 | } |
1598 | 1598 | |
1599 | 1599 | protected function formatTextFile( $text ) { |
1600 | | - $text = preg_replace( "/\n\\*([^\r\n]*?)\r?\n[ \t]+/", "\n*\\1 ", $text ); |
| 1600 | + $text = preg_replace( "/\r?\n(\r?\n)?\\[\\d+\\]/m", "\\1#", $text ); |
| 1601 | + do { |
| 1602 | + $prev = $text; |
| 1603 | + $text = preg_replace( "/\n([\\*#])([^\r\n]*?)\r?\n([^\r\n#\\*:]+)/", "\n\\1\\2 \\3", $text ); |
| 1604 | + } while ( $text != $prev ); |
1601 | 1605 | $text = preg_replace_callback('/\(bug (\d+)\)/', array( 'WebInstaller_ReleaseNotes', 'replaceBugLinks' ), $text ); |
1602 | 1606 | $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( 'WebInstaller_ReleaseNotes', 'replaceConfigLinks' ), $text ); |
1603 | 1607 | return $text; |
— | — | @@ -1615,15 +1619,20 @@ |
1616 | 1620 | |
1617 | 1621 | class WebInstaller_Readme extends WebInstaller_Document { |
1618 | 1622 | function getFileName() { return 'README'; } |
| 1623 | + |
| 1624 | + function getFileContents() { |
| 1625 | + return $this->formatTextFile( parent::getFileContents() ); |
| 1626 | + } |
1619 | 1627 | } |
| 1628 | + |
1620 | 1629 | class WebInstaller_ReleaseNotes extends WebInstaller_Document { |
1621 | 1630 | function getFileName() { return 'RELEASE-NOTES'; } |
1622 | 1631 | |
1623 | 1632 | function getFileContents() { |
1624 | | - echo $this->formatTextFile( parent::getFileContents() ); |
1625 | 1633 | return $this->formatTextFile( parent::getFileContents() ); |
1626 | 1634 | } |
1627 | 1635 | } |
| 1636 | + |
1628 | 1637 | class WebInstaller_Copying extends WebInstaller_Document { |
1629 | 1638 | function getFileName() { return 'COPYING'; } |
1630 | 1639 | } |