Quantcast

Hyphen (-) in footer content not working

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hyphen (-) in footer content not working

tsphillips
This post was updated on .
Rendering PDF documents, this works:

footer:
    height: 0.75in
    verso_content:
        right: 'Copyright (C)2015 2016 Company Name, Inc.'
        left: '{page-number}'
    recto_content:
        right: '{page-number}'
        left: 'Copyright (C)2015 2016 Company Name, Inc.'

Inserting a hyphen (e.g., "2015-2016") generates the below error message. I can escape the hyphen (\-), but then the escape character shows. Double/triple/quad escapes show all the backslashes plus a hyphen. I am guessing this is not expected behavior. I went to file a bug report, but given the large number of projects under "asciidoctor," I am not sure where to file to the report.

Is there a workaround to display a hyphen in footer content?

Error message when a hyphen (-) is used in a footer content attribute:

/Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1853:in `block (2 levels) in layout_running_content': undefined method `include?' for 0:Fixnum (NoMethodError)
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `block in layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `inject'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:176:in `convert_document'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:96:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:1044:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1503:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/bin/asciidoctor:14:in `<top (required)>'
        from /usr/bin/asciidoctor:22:in `load'
        from /usr/bin/asciidoctor:22:in `<main>'
/Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1853:in `block (2 levels) in layout_running_content': undefined method `include?' for 0:Fixnum (NoMethodError)
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `block in layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `inject'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:176:in `convert_document'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:96:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:1044:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1503:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/bin/asciidoctor:14:in `<top (required)>'
        from /usr/bin/asciidoctor:22:in `load'
        from /usr/bin/asciidoctor:22:in `<main>'
/Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1853:in `block (2 levels) in layout_running_content': undefined method `include?' for 0:Fixnum (NoMethodError)
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `block in layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `inject'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:176:in `convert_document'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:96:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:1044:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1503:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/bin/asciidoctor:14:in `<top (required)>'
        from /usr/bin/asciidoctor:22:in `load'
        from /usr/bin/asciidoctor:22:in `<main>'
/Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1853:in `block (2 levels) in layout_running_content': undefined method `include?' for 0:Fixnum (NoMethodError)
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1850:in `block in layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `inject'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:1848:in `layout_running_content'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:176:in `convert_document'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:96:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:1044:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1503:in `convert'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
        from /Library/Ruby/Gems/2.0.0/gems/asciidoctor-1.5.4/bin/asciidoctor:14:in `<top (required)>'
        from /usr/bin/asciidoctor:22:in `load'
        from /usr/bin/asciidoctor:22:in `<main>'
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hyphen (-) in footer content not working

mojavelinux
Administrator
This problem is solved in the unreleased version.


I plan to release 1.5.0.alpha.12 soon. Until then, you can build the gem from master and use that.

-Dan
Loading...