Changeset 11389
- Timestamp:
- 12/20/2021 12:55:45 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php
r11293 r11389 15 15 16 16 add_filter( 'template_redirect', array( $this, 'redirects' ), 1 ); 17 add_filter( 'handbook_label', array( $this, 'change_handbook_label' ), 10, 2 );17 add_filter( 'handbook_label', array( $this, 'change_handbook_label' ), 10, 2 ); 18 18 add_filter( 'handbook_display_toc', array( $this, 'disable_toc' ) ); 19 19 add_filter( 'get_post_metadata', array( $this, 'fix_markdown_source_meta' ), 10, 4 ); … … 292 292 ); 293 293 294 // Strip the trailing Code is Poetry footer from packages. 295 // See https://github.com/WordPress/gutenberg/blob/trunk/packages/README.md 296 $markdown = preg_replace( 297 // Strip, any number of <br>'s, any number of <p...>'s (with no text content), 298 // an img with 'codeispoetry' in an attribute, followed by any number of </p>'s and <br>'s before EOF 299 '@(<br\s*/?>)*(<p[^>]*>)*<img[^>]*codeispoetry[^>]*/?>(<(/p|br\s*/?)>)*$@i', 300 '', 301 $markdown 302 ); 303 294 304 return $markdown; 295 305 }
Note: See TracChangeset
for help on using the changeset viewer.