Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclosed markup error if span text goes past line #355

Open
mlos100 opened this issue Mar 15, 2024 · 2 comments
Open

Unclosed markup error if span text goes past line #355

mlos100 opened this issue Mar 15, 2024 · 2 comments
Labels

Comments

@mlos100
Copy link

mlos100 commented Mar 15, 2024

Describe the bug

When the text associated with a span element goes beyond the space allocated for one line, an Unclosed markup error occurs in the ChordPro Warning dialog.

The error does not occur if the lyrics plus Pango markup fits on the same line.

 : Markup error: " <span font_desc="Helvetica italic 9" foreground="#666666">(to Chorus then"
  Unclosed markup: <span font_desc="helvetica italic 9" foreground="#666666">
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF/Writer.pm line 225.
 : Markup error: " <span font_desc="Helvetica italic 9" foreground="#666666">(to Chorus"
  Unclosed markup: <span font_desc="helvetica italic 9" foreground="#666666">
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF/Writer.pm line 225.
 : Markup error: " <span font_desc="Helvetica italic 9" foreground="#666666">(to"
  Unclosed markup: <span font_desc="helvetica italic 9" foreground="#666666">
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF/Writer.pm line 225.
 : Markup error: " <span font_desc="Helvetica italic 9" foreground="#666666">(to"
  Unclosed markup: <span font_desc="helvetica italic 9" foreground="#666666">
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF/Writer.pm line 225.
 : Markup error: "Chorus then Outro)</span>"
  Closing <span> but no markup is open
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF/Writer.pm line 225.
 : Markup error: "Chorus then Outro)</span>"
  Closing <span> but no markup is open
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF/Writer.pm line 225.
 : Markup error: "Lift up your song 'Cause you've got a lion in side of those lungs  Get up and praise the  Lord     <span font_desc="Helvetica italic 9" foreground="#666666">(to"
  Unclosed markup: <span font_desc="Helvetica italic 9" foreground="#666666">
 : Markup error: "Chorus then Outro)</span>"
  Closing <span> but no markup is open
 at C:/Program Files/ChordPro.ORG/ChordPro/script/../lib/ChordPro/Output/PDF.pm line 2256.
 : Markup error: "Chorus then Outro)</span>"
  Closing <span> but no markup is open
 : Problems found!

To Reproduce

See Attached chord pro file, span-example.txt

Expected behavior

Ideally, I think the markup would extend onto the next line. That said, if the markup didn't fit on the same line, I would end up adjusting either the markup or lyrics so that the note did fit on the same line so I would be fine with an expected error that said the markup didn't fit on the line and was truncated.

Attachments

System information

  • OS Windows 10
  • Where did you get ChordPro from? GitHub
  • PDF Reader: PDF-Xchange Editor (free)

ChordPro Preview Editor version 6.050
https://www.chordpro.org
Copyright 2016,2024 Johan Vromans [email protected]

GUI designed with wxGlade

Run-time information:
ChordPro core 6.050
Perl v5.30.2 (C:/Program Files/ChordPro.ORG/ChordPro/wxchordpro.exe)
PPL Packager 1.00
CHORDPRO_LIB ~/lib/ChordPro
Resource path ~/lib/ChordPro
C:/Program Files/ChordPro.ORG/ChordPro/lib/ChordPro/res
ABC support QuickJS_XS (ABC2SVG version v1.22.12 of 2023-12-22)

Modules and libraries:
wxPerl 0.9932
wxWidgets 3.000002
Storable 3.25
Object::Pad 0.79
Text::Layout 0.032
File::LoadLines 1.045
PDF::API2 2.043
SVGPDF 0.083
Font::TTF 1.06
JavaScript::QuickJS 0.18

Additional context

@sciurius sciurius added the bug label Mar 15, 2024
@DrCostas
Copy link

DrCostas commented Dec 21, 2024

Just mentioning this is present in 6.060 and with italics or bold <>. This happens even when the text with the span is inside a {comment: ..}

@sciurius
Copy link
Collaborator

Yes ☹. It is high on the TODO list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants