From: Reinhold Kainhofer Date: Sun, 23 Sep 2007 12:03:03 +0000 (+0200) Subject: MusicXML: Fix indentation of the Output_printer X-Git-Tag: release/2.11.35-1~98 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a6d15c66a20432a2e7bf0d277a25105465f495db;p=lilypond.git MusicXML: Fix indentation of the Output_printer a < increases indentation by one. However, \< or -< should not and << should only increase by one, too. The same goes for \>, -> and >>. Signed-off-by: Reinhold Kainhofer --- diff --git a/python/musicexp.py b/python/musicexp.py index 504cdf139a..8649528aba 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -75,8 +75,14 @@ class Output_printer: self._line += str def unformatted_output (self, str): - self._nesting += str.count ('<') + str.count ('{') - self._nesting -= str.count ('>') + str.count ('}') + # don't indent on \< and indent only once on << + self._nesting += ( str.count ('<') + - str.count ('\<') - str.count ('<<') + + str.count ('{') ) + self._nesting -= ( str.count ('>') - str.count ('\>') - str.count ('>>') + - str.count ('->') - str.count ('_>') + - str.count ('^>') + + str.count ('}') ) self.print_verbatim (str) def print_duration_string (self, str):