JoliTypo\Fixer\CurlyQuote::fix PHP Method

fix() public method

public fix ( $content, StateBag $stateBag = null )
$stateBag JoliTypo\StateBag
    public function fix($content, StateBag $stateBag = null)
    {
        return preg_replace('@([a-z])\'@im', '$1' . Fixer::RSQUO, $content);
    }

Usage Example

Beispiel #1
0
 public function testFalsePositives()
 {
     $fixer = new Fixer\CurlyQuote();
     $this->assertEquals("She’s 6' 10\".", $fixer->fix("She's 6' 10\"."));
     $this->assertEquals('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
     $this->assertEquals("Here is a crying smiley: :'(", $fixer->fix("Here is a crying smiley: :'("));
 }
CurlyQuote