]> 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 35a670d70ee2f9ae4503789f2a762c5e17e82529..dc09e03d10d360404a71995df5a39ad5f4134f7f 100644 (file)
@@ -3,12 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2006--2008 Han-Wen Nienhuys <hanwen@lilypond.org>
+  (c) 2006--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
 
 */
 
 #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;
     }
 }