lib/Skriv/Markup/DocBook/Code.php
public function close() {
		$this->_programmingLanguage = str_replace(array('/', '\\', '..'), '', $this->_programmingLanguage);
		$currentContent = $this->_currentContent;
		$this->_currentContent = '';
		// remove the last carriage-return
		$last2 = substr($currentContent, -2);
		if ($last2 === "\r\n" || $last2 == "\n\r")
			$currentContent = substr($currentContent, 0, -2);
		else if (isset($last2[1]) && ($last2[1] == "\r" || $last2[1] == "\n"))
			$currentContent = substr($currentContent, 0, -1);
		// if no programming language was defined, it's a verbatim block
		if (empty($this->_programmingLanguage))
			return ('<literallayout>' . htmlspecialchars($currentContent) . '</literallayout>');
		return ('<programlisting language="' . $this->_programmingLanguage . '"><![CDATA[' . "$currentContent]]></programlisting>");
	}
public function close() {
		$this->_programmingLanguage = str_replace(array('/', '\\', '..'), '', $this->_programmingLanguage);
		$currentContent = $this->_currentContent;
		$this->_currentContent = '';
		// remove the last carriage-return
		$last2 = substr($currentContent, -2);
		if ($last2 === "\r\n" || $last2 == "\n\r")
			$currentContent = substr($currentContent, 0, -2);
		else if (isset($last2[1]) && ($last2[1] == "\r" || $last2[1] == "\n"))
			$currentContent = substr($currentContent, 0, -1);
		// if no programming language was defined, it's a verbatim block
		if (empty($this->_programmingLanguage))
			return ('<literallayout>' . htmlspecialchars($currentContent) . '</literallayout>');
		return ('<programlisting language="' . $this->_programmingLanguage . '"><![CDATA[' . "$currentContent]]></programlisting>");
	}
public function close ( ) { $ this -> _programmingLanguage = str_replace ( array ( '/' , '\\' , '..' ) , '' , $ this -> _programmingLanguage ) ; $ currentContent = $ this -> _currentContent ; $ this -> _currentContent = '' ; // remove the last carriage-return $ last2 = substr ( $ currentContent , - 2 ) ; if ( $ last2 === "\r\n" || $ last2 == "\n\r" ) $ currentContent = substr ( $ currentContent , 0 , - 2 ) ; else if ( isset ( $ last2 [ 1 ] ) && ( $ last2 [ 1 ] == "\r" || $ last2 [ 1 ] == "\n" ) ) $ currentContent = substr ( $ currentContent , 0 , - 1 ) ; // if no programming language was defined, it's a verbatim block if ( empty ( $ this -> _programmingLanguage ) ) return ( '<literallayout>' . htmlspecialchars ( $ currentContent ) . '</literallayout>' ) ; return ( '<programlisting language="' . $ this -> _programmingLanguage . '"><![CDATA[' . "$currentContent]]></programlisting>" ) ; }
Retourne le tag fermant, et positionne le flag interne pour dire qu'on n'est plus à l'intérieur d'un bloc stylisé.
@return	string	Le tag fermant.
Retourne le tag fermant et positionne le flag interne pour dire qu on n est plus à l intérieur d un bloc stylisé .