/** * Text pre-processing. * @param Texy * @param string * @return void */ public function beforeParse($texy, &$text) { self::$livelock = array(); // [la trine]: http://www.latrine.cz/ text odkazu .(title)[class]{style} if (!empty($texy->allowed['link/definition'])) { $text = TexyRegexp::replace($text, '#^\\[([^\\[\\]\\#\\?\\*\\n]{1,100})\\]: ++(\\S{1,1000})(\\ .{1,1000})?' . TexyPatterns::MODIFIER . '?\\s*()$#mUu', array($this, 'patternReferenceDef')); } }
/** * Text pre-processing. * * @param Texy * @param string * * @return void */ public function beforeParse($texy, &$text) { self::$livelock = array(); // [la trine]: http://www.latrine.cz/ text odkazu .(title)[class]{style} if (!empty($texy->allowed['link/definition'])) { $text = preg_replace_callback('#^\\[([^\\[\\]\\#\\?\\*\\n]+)\\]: +(\\S+)(\\ .+)?' . TEXY_MODIFIER . '?\\s*()$#mUu', array($this, 'patternReferenceDef'), $text); } }
public function beforeParse($texy, &$text) { self::$livelock = array(); if (!empty($texy->allowed['link/definition'])) { $text = preg_replace_callback('#^\\[([^\\[\\]\\#\\?\\*\\n]+)\\]: +(\\S+)(\\ .+)?' . TEXY_MODIFIER . '?\\s*()$#mUu', array($this, 'patternReferenceDef'), $text); } }
public function __construct() { // load all modules $this->loadModules(); // DEPRECATED if (self::$strictDTD !== NULL) { $this->setOutputMode(self::$strictDTD ? self::XHTML1_STRICT : self::XHTML1_TRANSITIONAL); } else { $this->setOutputMode(self::XHTML1_TRANSITIONAL); } // DEPRECATED $this->cleaner =& $this->htmlOutputModule; // examples of link references ;-) $link = new TexyLink('http://texy.info/'); $link->modifier->title = 'The best text -> HTML converter and formatter'; $link->label = 'Texy!'; $this->linkModule->addReference('texy', $link); $link = new TexyLink('http://www.google.com/search?q=%s'); $this->linkModule->addReference('google', $link); $link = new TexyLink('http://en.wikipedia.org/wiki/Special:Search?search=%s'); $this->linkModule->addReference('wikipedia', $link); }
public function beforeParse($texy, &$text) { self::$livelock = array(); if (!empty($texy->allowed['link/definition'])) { $text = preg_replace_callback('#^\\[([^\\[\\]\\#\\?\\*\\n]{1,100})\\]: ++(\\S{1,1000})(\\ .{1,1000})?' . TEXY_MODIFIER . '?\\s*()$#mUu', array($this, 'patternReferenceDef'), $text); if (preg_last_error()) { throw new TexyPcreException(); } } }
/** * Text pre-processing. * @param Texy * @param string * @return void */ public function beforeParse($texy, & $text) { self::$livelock = array(); // [la trine]: http://www.latrine.cz/ text odkazu .(title)[class]{style} if (!empty($texy->allowed['link/definition'])) { $text = preg_replace_callback( '#^\[([^\[\]\#\?\*\n]{1,100})\]: ++(\S{1,1000})(\ .{1,1000})?'.TEXY_MODIFIER.'?\s*()$#mUu', array($this, 'patternReferenceDef'), $text ); if (TEXY_CHECK_PCRE && preg_last_error()) throw new TexyPcreException; } }
public function __construct() { // load all modules $this->loadModules(); $this->setOutputMode(self::HTML4_TRANSITIONAL); // examples of link references ;-) $link = new TexyLink('http://texy.info/'); $link->modifier->title = 'The best text -> HTML converter and formatter'; $link->label = 'Texy!'; $this->linkModule->addReference('texy', $link); $link = new TexyLink('http://www.google.com/search?q=%s'); $this->linkModule->addReference('google', $link); $link = new TexyLink('http://en.wikipedia.org/wiki/Special:Search?search=%s'); $this->linkModule->addReference('wikipedia', $link); }