2declare( strict_types = 1 );
4namespace MediaWiki\Extension\Translate\PageTranslation;
20 public function __construct(
string $open,
string $contents,
string $close ) {
22 $this->contents = $contents;
23 $this->close = $close;
26 public function contents():
string {
28 return preg_replace(
'/\A\n|\n\z/',
'', $this->contents );
31 public function wrappedContents():
string {
32 return $this->open . $this->contents . $this->close;
Section is one pair of <translate>...</translate> tags.