diff --git a/App/Dataclasses/DatabaseFolkTuneDetails.php b/App/Dataclasses/DatabaseFolkTuneDetails.php index c305afe..0559a0e 100644 --- a/App/Dataclasses/DatabaseFolkTuneDetails.php +++ b/App/Dataclasses/DatabaseFolkTuneDetails.php @@ -65,15 +65,18 @@ K: {$this->Parts[$counter]->KeySignature}"; public function BuildSimple(): string { - $builder = "X: {$this->ID} -L: 1/4"; - - $builder .= " + $notation = $this->Parts[0]->ABCNotation; + $notation = preg_replace( + pattern: "/\r|\n/", + replacement: "", + subject: $notation + ); + + return " +X: {$this->ID} +L: 1/4 K: {$this->Parts[0]->KeySignature} -M: {$this->Parts[0]->TimeSignature}"; - - $builder .= " -{$this->Parts[0]->ABCNotation}"; - return $builder; +M: {$this->Parts[0]->TimeSignature} +{$notation}"; } } \ No newline at end of file