Comments (2)
Reports from @MurakamiShinyu
わかりました。
<nav id="toc"> <h2>Contents</h2> <ol> <li><a href="#1">A Scandal in Bohemia</a> ... <h2><a id="1"><span class="chap-num">Adventure I</span> A Scandal in Bohemia</a></h2> ...id が数字ではじまっています。HTML5からこれはOKになったはずなのですが、pagedjs内部でidと認識しないでバグっているようです。数字の前に "id" をつけて href="#id1" id="id1" などとしたら、動きました。vivliostyle_doc のほうを修正しますね。(コロン→セミコロンの修正も)
from examples-vivliostyle-pagedjs.
Reports from @MurakamiShinyu
id についてHTML仕様に https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute
... IDs can consist of just digits, start with a digit, ...
と明記されています。
サンプルは直さない方がよいですね。pagedjsのバグとしてpagedjsに報告するのが適切だと思います。
pagedjs内部でidと認識しないでバグっているようです。
と書いたのも訂正したい。idと認識されてます。pagedjsは各idに対してCSSのセレクタを作るようです。
id="1"
に対してそのセレクタが#1
になってるのが問題です。CSSでは数字ではじまるのはダメなのでエスケープが必要で#\31
などとしなくてはいけません。それで querySelector()で invalid selector のエラーが起きています。
Issueとしては、数字で始まるidがHTML内にあるとpagedjsがハングアップするとだけ伝えれば十分でしょう。
from examples-vivliostyle-pagedjs.
Related Issues (16)
- Build an environment
- Duplicate commands and incorrect paths
- Add npm install to the README Setup
- Split clean command between Vivliostyle and Paged.js
- Make Vivliostyle and print-css.rocks samples buildable individually
- The serial number of the output PDF file name is incorrect
- Unable to reference relative path CSS in print-css.rocks
- Implement the command to preview/build
- Remove unnecessary samples and previews
- print-css.rocks Incorrect path specification for sample
- Release v1.0.0
- lesson-two-column-with-author-box gives an error HOT 1
- Remove the XML samples HOT 1
- Wrong Vivliostyle sample output file name in Paged.js
- Separate the output destination of the file by destination
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples-vivliostyle-pagedjs.