WordPress.org

Making WordPress.org

Changeset 4554


Ignore:
Timestamp:
12/16/2016 08:47:48 PM (2 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Fix source code display including an extra line.

Props keesiemeijer.
Fixes #2311.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r4499 r4554  
    11931193
    11941194                // Stop reading file once end_line is reached.
    1195                 if ( $line > $end_line ) {
     1195                if ( $line >= $end_line ) {
    11961196                    break;
    11971197                }
     
    11991199                // Skip lines until start_line is reached.
    12001200                if ( $line < $start_line ) {
    1201                     continue;
    1202                 }
    1203 
    1204                 // Skip the last line if it is "endif;"; the parser includes the
    1205                 // endif of a if/endif wrapping typical of pluggable functions.
    1206                 if ( $line === $end_line && 'endif;' === trim( $source_line ) ) {
    12071201                    continue;
    12081202                }
Note: See TracChangeset for help on using the changeset viewer.