/**
  * 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);
     }
 }
 /**
  * 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'));
     }
 }
 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);
     }
 }
Beispiel #4
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();
         }
     }
 }
Beispiel #5
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;
		}
	}