php-textile icon indicating copy to clipboard operation
php-textile copied to clipboard

Add support for different quotation styles.

Open netcarver opened this issue 14 years ago • 1 comments

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.

netcarver avatar Jan 10 '11 17:01 netcarver

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".');

gocom avatar Jun 15 '19 21:06 gocom