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

HTMLにおけるid固有性をre単位ではなくドキュメント全体に適用する #551

Open
kmuto opened this issue Apr 14, 2016 · 2 comments

Comments

@kmuto
Copy link
Owner

kmuto commented Apr 14, 2016

CSS組版エンジンを使った処理系を考慮すると、HTMLにおいて今各章でIDは一意とされていればよしとしているが、ドキュメント全体で一意となっていないとまずくなりそう。

一意性はreファイル名(@chapter.name)と組み合わせることで担保し、あとはnormalize_idを調整(bibやlabelのようにchapter.nameを付けてほしくないものはそのままとする)するという方向でどうでしょうか。

@takahashim
Copy link
Collaborator

ReVIEW::Converterクラスが導入されたおかげで、同一のRubyプロセス内で処理できるようになったのでこの辺りはやりやすくなったはずです。
ついでに同一画像ファイルの使い回しについても一意性を確保したい…。

@kmuto kmuto mentioned this issue Apr 16, 2016
7 tasks
@kmuto
Copy link
Owner Author

kmuto commented Apr 17, 2016

Converterのtarget属性にconvertメソッド内でchap_nameの値を代入、あたりでしょうか。でも結局@compile.compileに渡さないといけないので、属性にせずにCompiler#compileの第二引数に渡すだけでもよい?
画像についてはid属性で同じように一意性を出せればいいんでしょうか。

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