php-textile
php-textile copied to clipboard
Add support for different quotation styles.
Although you can edit classTextile.php and set the kind of quotes you need, this isn't always convenient -- especially for multi-lingual documents where the quote marks used can change within either a set of documents or even within the same document.
Would be nice to be able to automatically select the correct open/close quote marks for the language currently being used.
Quotes can now days be configured with the Parser::setSymbol
method:
$parser = new \Netcarver\Textile\Parser();
$parser
->setSymbol('quote_single_open', '‘')
->setSymbol('quote_single_close', '’')
->setSymbol('quote_double_open', '“')
->setSymbol('quote_double_close', '”');
echo $parser->parse('Hello "there".');