Changeset 7658
- Timestamp:
- 09/11/2018 05:53:50 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/inc/docs-importer.php
r7598 r7658 277 277 278 278 // Remove the .md extension from relative links 279 $markdown = preg_replace( '/(\[.*?\]\((\.\.\/)+.*?)(\.md)? \)/i', '$1)', $markdown );279 $markdown = preg_replace( '/(\[.*?\]\((\.\.\/)+.*?)(\.md)?(#.*)?\)/i', '$1$4)', $markdown ); 280 280 281 281 // Remove the (../)*docs/ path from relative links, and replace it with an absolute URL 282 $markdown = preg_replace( '/(\[.*?\])\((\.\.\/)+docs\/(.*?)\/? \)/i', '$1(https://wordpress.org/gutenberg/handbook/$3/)', $markdown );282 $markdown = preg_replace( '/(\[.*?\])\((\.\.\/)+docs\/(.*?)\/?(#.*)?\)/i', '$1(https://wordpress.org/gutenberg/handbook/$3/$4)', $markdown ); 283 283 284 284 // Transform to HTML
Note: See TracChangeset
for help on using the changeset viewer.