Extract score writer changes from SoundCraft 7509b64c

This commit is contained in:
NetterSilver authored and Dylan M. Taylor committed 2026-11-16 19:20:52 -05:00
1 parent 12db39ca96
commit 68abf77e2d
1 file changed
+7 -1
+7 -1
View File
@@ -45,7 +45,13 @@ fn spell(pitch: u8) -> (char, i32, i32) {
}
fn xml_escape(s: &str) -> String {
s.replace('&', "&amp;").replace('<', "&lt;").replace('>', "&gt;").replace('"', "&quot;")
s.chars()
.filter(|c| matches!(c, '\t' | '\n' | '\r' | '\u{20}'..='\u{D7FF}' | '\u{E000}'..='\u{FFFD}' | '\u{10000}'..='\u{10FFFF}'))
.collect::<String>()
.replace('&', "&amp;")
.replace('<', "&lt;")
.replace('>', "&gt;")
.replace('"', "&quot;")
}
fn note_type(units: u32) -> (&'static str, bool) {