Skip to content

Commit dfb3303

Browse files
committed
handle starting and ending whitespace in song regex (#11158)
1 parent 5c690a6 commit dfb3303

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pxtblocks/fields/field_musiceditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class FieldMusicEditor extends FieldAssetEditor<FieldMusicEditorOptions,
3939
let song: pxt.assets.music.Song;
4040

4141
if (text) {
42-
const match = /^\s*hex\s*`([a-fA-F0-9]+)`\s*(?:;?)\s*$/.exec(text);
42+
const match = /^\s*hex\s*`\s*([a-fA-F0-9]+)\s*`\s*(?:;?)\s*$/.exec(text);
4343

4444
if (match) {
4545
song = pxt.assets.music.decodeSongFromHex(match[1]);

0 commit comments

Comments
 (0)