Files
2025-04-04 15:27:23 +02:00

18 lines
418 B
JavaScript

CodeMirror.defineMode("lilypond", function() {
return {
token: function(stream) {
// Highlight Comments
if (stream.match(/%.*$/)) {
return "comment";
}
// Highlight LilyPond commands (e.g., \relative, \time, \key)
if (stream.match(/\\[a-zA-Z]+/)) {
return "keyword";
}
// Move to the next character
stream.next();
return null;
}
};
});