You are here

function EducateBackticks in Typogrify 7

Same name and namespace in other branches
  1. 5 smartypants.php \EducateBackticks()
  2. 6 smartypants.php \EducateBackticks()

Example input: ``Isn't this fun?'' Example output: “Isn't this fun?”.

Parameters

string $_: Input text.

Return value

string The string, with ``backticks'' -style double quotes translated into HTML curly quote entities.

2 calls to EducateBackticks()
SmartQuotes in ./smartypants.php
SmartQuotes
SmartyPants in ./smartypants.php
SmartyPants.

File

./smartypants.php, line 938
SmartyPants - Smart punctuation for web sites

Code

function EducateBackticks($_) {
  $_ = str_replace(array(
    "``",
    "''",
    ",,",
  ), array(
    '“',
    '”',
    '„',
  ), $_);
  return $_;
}