]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/instrument-switch-engraver.cc
Bump documentation license to v1.3+.
[lilypond.git] / lily / instrument-switch-engraver.cc
index a2830554ede8a30e50acfc5c8191815288d7e984..dc09e03d10d360404a71995df5a39ad5f4134f7f 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "engraver.hh"
 #include "item.hh"
+#include "text-interface.hh"
 #include "translator.icc"
 
 
@@ -41,8 +42,11 @@ Instrument_switch_engraver::process_music ()
   
   if (!scm_is_eq (cue_name_, cue_text))
     {
-      text_ = make_item ("InstrumentSwitch", SCM_EOL);
-      text_->set_property ("text", cue_text);
+      if (Text_interface::is_markup (cue_text))
+        {
+          text_ = make_item ("InstrumentSwitch", SCM_EOL);
+          text_->set_property ("text", cue_text);
+        }
       cue_name_ = cue_text;
     }
 }