Changeset 28726 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 06/10/2014 02:21:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r28725 r28726 92 92 } 93 93 94 $static_characters = array_merge( array( ' ---', '...', '``', '\'\'', ' (tm)' ), $cockney );95 $static_replacements = array_merge( array( $em_dash,'…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace );94 $static_characters = array_merge( array( '...', '``', '\'\'', ' (tm)' ), $cockney ); 95 $static_replacements = array_merge( array( '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace ); 96 96 97 97 $spaces = wp_spaces_regexp(); … … 114 114 } 115 115 116 // Single quote at start, or preceded by (, {, <, [, ", or spaces.116 // Single quote at start, or preceded by (, {, <, [, ", -, or spaces. 117 117 if ( "'" !== $opening_single_quote ) { 118 $dynamic[ '/(?<=\A|[([{<" ]|' . $spaces . ')\'/' ] = $opening_single_quote;118 $dynamic[ '/(?<=\A|[([{<"\-]|' . $spaces . ')\'/' ] = $opening_single_quote; 119 119 } 120 120 … … 134 134 } 135 135 136 // Double quote at start, or preceded by (, {, <, [, or spaces, and not followed by spaces.136 // Double quote at start, or preceded by (, {, <, [, -, or spaces, and not followed by spaces. 137 137 if ( '"' !== $opening_quote ) { 138 $dynamic[ '/(?<=\A|[([{< ]|' . $spaces . ')"(?!' . $spaces . ')/' ] = $opening_quote;138 $dynamic[ '/(?<=\A|[([{<\-]|' . $spaces . ')"(?!' . $spaces . ')/' ] = $opening_quote; 139 139 } 140 140 … … 150 150 151 151 // Dashes and spaces 152 $dynamic[ '/---/' ] = $em_dash; 152 153 $dynamic[ '/(?<=' . $spaces . ')--(?=' . $spaces . ')/' ] = $em_dash; 153 154 $dynamic[ '/(?<!xn)--/' ] = $en_dash;
Note: See TracChangeset
for help on using the changeset viewer.