WordPress.org

Making WordPress.org

Changeset 4386


Ignore:
Timestamp:
11/21/2016 02:46:11 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Temporarily disable line-wrapping unwraveling to fix <code> preformatted text.
This was eating new-lines within the code tag in addition to those within ps.

Fixes #1801

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php

    r4196 r4386  
    459459        $text = wp_kses( $text, $allowed );
    460460
    461         // wpautop() will eventually replace all \n's with <br>s, and that isn't what we want.
    462         $text = preg_replace( "/(?<![> ])\n/", ' ', $text );
     461        // wpautop() will eventually replace all \n's with <br>s, and that isn't what we want (The text may be line-wrapped in the readme, we don't want that, we want paragraph-wrapped text)
     462        // TODO: This incorrectly also applies within `<code>` tags which we don't want either.
     463        //$text = preg_replace( "/(?<![> ])\n/", ' ', $text );
    463464
    464465        $text = trim( $text );
Note: See TracChangeset for help on using the changeset viewer.