/**
  * 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);
     }
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 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();
         }
     }
 }
Esempio n. 6
0
	/**
	 * 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;
		}
	}
Esempio n. 7
0
	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);
	}