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

章番号を表示しないようにするとrake pdfがコケる #1559

Closed
kdmsnr opened this issue Aug 28, 2020 · 1 comment · Fixed by #1561
Closed

章番号を表示しないようにするとrake pdfがコケる #1559

kdmsnr opened this issue Aug 28, 2020 · 1 comment · Fixed by #1561

Comments

@kdmsnr
Copy link
Collaborator

kdmsnr commented Aug 28, 2020

章番号を表示しないように locale.yml を以下のようにしてから、

locale: ja
chapter: ""

rake pdf すると、「review/lib/review/latexutils.rb:68:in `escape': undefined method `gsub' for nil:NilClass (NoMethodError) rake aborted!」になる。

latexutils.rb:

    def escape(str)
      str.gsub(@metachars_re) { |s| @metachars[s] or raise "unknown trans char: #{s}" }
    end

↓ nil.to_s でよければ。。。

    def escape(str)
      str.to_s.gsub(@metachars_re) { |s| @metachars[s] or raise "unknown trans char: #{s}" }
    end
@takahashim
Copy link
Collaborator

どちらかというと、正しく設定されていればnilが来ない方が良いかと思うので、そちらで修正してみます。

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

Successfully merging a pull request may close this issue.

2 participants