Making WordPress.org

Ticket #5304: 5304.diff

File 5304.diff, 1.5 KB (added by ocean90, 5 years ago)
  • trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php

     
    228228                        $url = get_post_type_archive_link( 'wp-parser-function' ) .
    229229                                        sanitize_title_with_dashes( html_entity_decode( $link ) );
    230230                }
    231                
     231
    232232                if ( $url ) {
    233233                        $link = self::generate_link( $url, $link );
    234234                }
     
    264264
    265265                return sprintf( '<a%s>%s</a>', $attributes, esc_html( $text ) );
    266266        }
    267        
     267
    268268        /**
    269269         * Fixes unintended markup generated by Markdown during parsing.
    270270         *
     
    322322                        // Display as simple plaintext list.
    323323                        $text = str_replace( ' * ', '<br /> * ', $text );
    324324                }
     325                if ( false !== strpos( $text, ' - ' ) )  {
     326                        // Display as simple plaintext list.
     327                        $text = str_replace( ' - ', '<br /> - ', $text );
     328                }
    325329
    326330                // Convert any @link or @see to actual link.
    327331                $text = self::make_doclink_clickable( $text );
     
    511515                        list( $wordtype, $type, $name, $description ) = explode( ' ', $part . '    ', 4 ); // extra spaces ensure we'll always have 4 items.
    512516                        $description = trim( $description );
    513517                        $description = self::autolink_references( $description );
     518                        $description = self::fix_param_description_parsedown_bug( $description );
    514519
    515520                        $skip_closing_li = false;
    516521