Viewing 1 replies (of 1 total)
  • Thread Starter TiKu

    (@tiku)

    I think I found a solution. Search for this code in php-typography.php:

    if(isset($this->settings["smartFractions"]) && $this->settings["smartFractions"]) {

    Shortly afterwards the variable $pat is set. Replace

    $pat = "/
    				(?<=\A|\s|$nbsp|$nbnsp)																# lookbehind assertion: makes sure we are not messing up a url
    				(\d+)
    				(?:\s?\/\s?".$this->chr["zeroWidthSpace"].")										# strip out any zero-width spaces inserted by wrap_hard_hyphens
    				(\d+)
    				(
    					(?:\<sup\>(?:st|nd|rd|th)<\/sup\>)?												# handle ordinals after fractions
    					(?:\Z|\s|$this->chr['noBreakSpace']|$this->chr['noBreakNarrowSpace']|\.|\!|\?|\)|\;|\:|\'|\")			# makes sure we are not messing up a url
    				)
    			/xu";

    with

    $pat = "/
    				(?<=\A|\s|$nbsp|$nbnsp)																# lookbehind assertion: makes sure we are not messing up a url
    				(\d+)
    				(?:\s?\/\s?".$this->chr["zeroWidthSpace"].")										# strip out any zero-width spaces inserted by wrap_hard_hyphens
    				(\d+)
    				(
    					(?:\<sup\>(?:st|nd|rd|th)<\/sup\>)?												# handle ordinals after fractions
    					(?:\Z|\s|".$this->chr["noBreakSpace"]."|".$this->chr["noBreakNarrowSpace"]."|\.|\!|\?|\)|\;|\:|\'|\")			# makes sure we are not messing up a url
    				)
    			/xu";

    Regards
    TiKu

Viewing 1 replies (of 1 total)
  • The topic ‘Array to string conversion in php-typography.php on line 1377’ is closed to new replies.