/** * Makes only typographic corrections. * @param string input text (in encoding defined by Texy::$encoding) * @return string output text (in UTF-8) */ public function processTypo($text) { // convert to UTF-8 (and check source encoding) $text = Utf::toUtf($text, $this->encoding); // standardize line endings and spaces $text = Helpers::normalize($text); $this->typographyModule->beforeParse($this, $text); $text = $this->typographyModule->postLine($text, TRUE); if (!empty($this->allowed['longwords'])) { $text = $this->longWordsModule->postLine($text); } return Utf::utf2html($text, $this->encoding); }
/** * Makes only typographic corrections. * @param string input text * @return string output text */ public function processTypo($text) { // standardize line endings and spaces $text = Helpers::normalize($text); $this->typographyModule->beforeParse($this, $text); $text = $this->typographyModule->postLine($text, TRUE); if (!empty($this->allowed['longwords'])) { $text = $this->longWordsModule->postLine($text); } return $text; }