/**
* @param string $text
* @param string $model_id
+ * @throws MWException
*/
public function __construct( $text, $model_id = CONTENT_MODEL_TEXT ) {
parent::__construct( $model_id );
$text = $this->getNativeData();
$pst = rtrim( $text );
- return ( $text === $pst ) ? $this : new static( $pst );
+ return ( $text === $pst ) ? $this : new static( $pst, $this->getModel() );
}
/**