Changeset 1781305
- Timestamp:
- 12/05/2017 11:51:58 AM (8 years ago)
- Location:
- post-typographer/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
typopost.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-typographer/trunk/readme.txt
r1729793 r1781305 2 2 Tags: typography, formatting, post, posts, plugin 3 3 Requires at least: 2.5 4 Tested up to: 4. 8.15 Stable tag: 1 14 Tested up to: 4.9.1 5 Stable tag: 12 6 6 Author: Andriy Moraru 7 Version: 1 17 Version: 12 8 8 Author URI: https://www.earnforex.com 9 9 … … 73 73 == Changelog == 74 74 75 = 12 = 76 * Fixed: Will no longer mess with the contents of the [pmath] shortcodes. 77 75 78 = 11 = 76 79 * Fixed: Replaced numeric HTML entities with literal ones. -
post-typographer/trunk/typopost.php
r1729782 r1781305 5 5 Description: Formats the text according to typography rules. Works with English texts only. 6 6 Author: Andriy Moraru 7 Version: 1 17 Version: 12 8 8 Author URI: https://www.earnforex.com 9 9 */ … … 53 53 $without_html[$i] = preg_replace('@ {2,}@', ' ', $without_html[$i]); 54 54 55 //Add m-dashes with a preceeding non-breaking space, in place of the hyphens, where neeeded56 $without_html[$i] = str_replace(' - ', ' — ', $without_html[$i]);57 55 58 56 //Get the array of strings made of text without text wrapped with [] tags 59 $without_square = preg_split('@\[(video|code)\].*\[/(video|code)\]@', $without_html[$i]); 57 $without_square = preg_split('@\[(video|code|(pmath( size=[0-9]+)?))\].*\[/(video|code|pmath)\]@', $without_html[$i]); 58 59 //Add m-dashes with a preceding non-breaking space, in place of the hyphens, where needed 60 $without_square = str_replace(' - ', ' — ', $without_square); 61 60 62 //Get the array of [] tags from the text 61 $n_square = preg_match_all('@\[(video|code )\].*\[/(video|code)\]@', $without_html[$i], $square);63 $n_square = preg_match_all('@\[(video|code|(pmath( size=[0-9]+)?))\].*\[/(video|code|pmath)\]@', $without_html[$i], $square); 62 64 63 65 for ($j = 0; $j <= $n_square; $j++)
Note: See TracChangeset
for help on using the changeset viewer.