-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Lilypond accepts language names with or without double quotes around the name.
Quickly does not recognize the language name if it is not quoted.
To reproduce, run the following code:
text = r"""
% Correctly detected
\language "nederlands"
\language "català"
\language "catalan"
\language "deutsch"
\language "english"
\language "español"
\language "espanol"
\language "français"
\language "italiano"
\language "norks"
\language "português"
\language "portugues"
\language "suomi"
\language "svenska"
\language "vlaams"
% Should be detected as well
\language nederlands
\language català
\language catalan
\language deutsch
\language english
\language español
\language espanol
\language français
\language italiano
\language norks
\language português
\language portugues
\language suomi
\language svenska
\language vlaams
"""
doc = parce.Document(LilyPond.root, transformer=True)
doc.set_text(text)
music = doc.get_transform(True)
music.dump()The second form (without quotes) leads to lily.Language nodes with None as the detected language, followed by a lily.Symbol node containing the unparsed language name.
Metadata
Metadata
Assignees
Labels
No labels