X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=75fe418591e457ca349a2248123269d3fbdb6621;hb=29d0c4b33b7bc6434d32d735358b8768e965c117;hp=42991681ad02a611121aa3fe0d7e8cadeeb6b6a1;hpb=b89a7d77e2bb3355e554902ee68b203eee60c503;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 42991681ad..75fe418591 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -351,7 +351,9 @@ def compose_ly (code, options): if QUOTE in options and LINEWIDTH in options: options.remove (LINEWIDTH) - if FRAGMENT in options: + m = re.search (r'''\\(header|score)''', code) + if not m and (not options \ + or not NOFRAGMENT in options or FRAGMENT in options): if RAGGEDRIGHT not in options: options.append (RAGGEDRIGHT) body = FRAGMENT_LY