WordPress.org

Make WordPress Core

Ticket #11947: formatting.diff

File formatting.diff, 898 bytes (added by akerem, 10 years ago)

Diff file for formatting.php

  • .php

    old new  
    185185        $pee = $pee . "\n"; // just to make things a little easier, pad the end
    186186        $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
    187187        // Space things out a little
    188         $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend)';
     188        $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend)';
    189189        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
    190190        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
    191191        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines