Closed speirling closed 6 years ago
The fault is in the html structure, so presumably regex problem
src/Controller/SongsController.php view method
$song['content'] = StaticFunctionController::convert_song_content_to_HTML($song['content'], $song['base_key'], $key, $capo);
src/Controller/StaticFunctionController.php convert_song_content_to_HTML method
//anything in square brackets is taken to be a chord and should be processed to create chord html
$contentHTML = preg_replace_callback('/\[(.*?)\]/', 'self::chord_replace_callback', $contentHTML);
//if there's a bass modifier, give it its own html
$contentHTML = preg_replace('#<span class="chord">([^<]*?)/([^<]*?)</span>#','<span class="chord">$1<span class="bass_note_modifier separator">/</span><span class="bass_note_modifier note">$2</span></span>', $contentHTML);
Maybe the bass modifier should be part of the chord html subroutine?
fixed in commit c034fdd0b2b7893199c365472a7f20e585039fc2
See https://fps.epeelo.com:9134/songbook/songs/view/735 Only the last chord+bassnote in each line is properly styled. Maybe a regex error?