Added lilypond edition
This commit is contained in:
17
folkugat_web/assets/static/js/lilypond.js
Normal file
17
folkugat_web/assets/static/js/lilypond.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user