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

epubmakerがfootnote内のhrefの解釈に失敗する #589

Closed
mhidaka opened this issue Apr 24, 2016 · 1 comment
Closed

epubmakerがfootnote内のhrefの解釈に失敗する #589

mhidaka opened this issue Apr 24, 2016 · 1 comment
Milestone

Comments

@mhidaka
Copy link
Contributor

mhidaka commented Apr 24, 2016

Re:VIEW 2.0.0候補(現在のmaster)をテスト中、構文の解釈に失敗したっぽいのでご報告いたします。

epubmaker 1.7.2では発生しなかったので何らかのデグレが起きてるみたいです。
具体的にはfootnoteの中にhrefをいれるとよくなさそうです。

UCDは1999年にISO13407@<fn>{ISO13407} として国際規格化されており、日本国内でも『人間中心設計開発機構』@<fn>{ucdnet}というNPO法人が活動しています。
UCDは1986年に認知心理学者のD.A.ノーマン博士の発表した"The Design of Everyday Things"、邦題『誰のためのデザイン?認知科学者デザイン原論』@<fn>{the_design_of_eveeryday_thing}の中で著されました。
ノーマン博士は著書の中でデザインは、確実に、ユーザーが何をしたらよいのか分かるようにしておくことと、何が起きているのかをユーザーに分かるようにしておくべきであるとしています。

では、このUCDの実践は具体的にどのように行うのでしょうか。

//footnote[ISO13407][ISO13407は2010年にISO9241-210として改訂されています @<href>{http://www.webstore.jsa.or.jp/webstore/Com/FlowControl.jsp?lang=jp&bunsyoId=ISO+9241-210%3A2010&dantaiCd=ISO&status=1}]
//footnote[ucdnet][@<href>{http://www.hcdnet.org/}]
//footnote[the_design_of_eveeryday_thing][@<href>{http://www.amazon.co.jp/dp/478850362X}]

このとき、次のエラーが発生します

Illegal character '&' in raw string "https://play.google.com/store/apps/details?id=com.google.android.gms&hl=ja"
Line: -1
Position: -1
Last 80 unconsumed characters:
compile error in mochico_user_test.re (REXML::ParseException)
#<RuntimeError: Illegal character '&' in raw string "http://www.webstore.jsa.or.jp/webstore/Com/FlowControl.jsp?lang=jp&bunsyoId=ISO+9241-210%3A2010&dantaiCd=ISO&status=1">
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/text.rb:155:in `block in check'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/text.rb:153:in `scan'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/text.rb:153:in `check'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/attribute.rb:153:in `element='
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/element.rb:1103:in `[]='
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:35:in `block in parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:34:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:34:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/document.rb:287:in `build'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:341:in `new'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:341:in `block in detect_properties'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:340:in `open'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:340:in `detect_properties'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:356:in `write_info_body'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:318:in `build_chap'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:240:in `block (2 levels) in build_body'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:239:in `each'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:239:in `block in build_body'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:224:in `each'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:224:in `build_body'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/lib/review/epubmaker.rb:81:in `produce'
/Users/mhidaka/.bundler/ruby/2.0.0/review-5d9561fd7699/bin/review-epubmaker:44:in `<main>'
...
Illegal character '&' in raw string "http://www.webstore.jsa.or.jp/webstore/Com/FlowControl.jsp?lang=jp&bunsyoId=ISO+9241-210%3A2010&dantaiCd=ISO&status=1"
Line: -1
Position: -1
Last 80 unconsumed characters:
compile error, No EPUB file output.
kdmsnr added a commit to kdmsnr/review that referenced this issue Apr 24, 2016
kdmsnr added a commit to kdmsnr/review that referenced this issue Apr 24, 2016
@kmuto kmuto closed this as completed in f035393 Apr 24, 2016
kmuto added a commit that referenced this issue Apr 24, 2016
Escape html correctly, Fix #589
@kdmsnr kdmsnr added this to the 2.0.0 milestone Apr 24, 2016
@mhidaka
Copy link
Contributor Author

mhidaka commented Apr 24, 2016

手元でもキチンと動きました。ありがとうございます!

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

No branches or pull requests

2 participants