File tree Expand file tree Collapse file tree 8 files changed +66
-2
lines changed Expand file tree Collapse file tree 8 files changed +66
-2
lines changed Original file line number Diff line number Diff line change @@ -242,5 +242,5 @@ ace.hasMathML = function() {
242
242
}
243
243
244
244
ace . hasPageBreaks = function ( ) {
245
- return document . querySelectorAll ( '[epub\\: type~="pagebreak"], [role~="doc-pagebreak"]' ) . length > 0 ;
245
+ return document . querySelectorAll ( '[*| type~="pagebreak"], [role~="doc-pagebreak"]' ) . length > 0 ;
246
246
}
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ describe('finding pagebreaks', () => {
321
321
expect ( results ) . toBe ( false ) ;
322
322
} ) ;
323
323
324
- test . skip ( 'epub:type break' , async ( ) => {
324
+ test ( 'epub:type break' , async ( ) => {
325
325
const results = await run ( 'hasPageBreaks' , '<span epub:type="pagebreak" />' ) ;
326
326
expect ( results ) . toBe ( true ) ;
327
327
} ) ;
Original file line number Diff line number Diff line change @@ -50,3 +50,9 @@ test('issue #57: Failed to execute \'matches\' on \'Element\': \'m:annotation-xm
50
50
const report = await ace ( '../data/issue-57' ) ;
51
51
expect ( report [ 'earl:result' ] [ 'earl:outcome' ] ) . toEqual ( 'pass' ) ;
52
52
} ) ;
53
+
54
+ test ( 'issue #85: failed to detect page markers from `epub:type`' , async ( ) => {
55
+ const report = await ace ( '../data/issue-85' ) ;
56
+ expect ( report [ 'earl:result' ] [ 'earl:outcome' ] ) . toEqual ( 'pass' ) ;
57
+ expect ( report . properties . hasPageBreaks ) . toBe ( true ) ;
58
+ } ) ;
Original file line number Diff line number Diff line change
1
+ < html xmlns ="http://www.w3.org/1999/xhtml " xmlns:epub ="http://www.idpf.org/2007/ops " xml:lang ="en ">
2
+ < head >
3
+ < title > Minimal EPUB</ title >
4
+ </ head >
5
+ < body >
6
+ < h1 > Loomings</ h1 >
7
+ < p > Call me Ishmael.</ p >
8
+ < span id ="p1 " epub:type ="pagebreak " aria-label ="page 1 "/>
9
+ </ body >
10
+ </ html >
Original file line number Diff line number Diff line change
1
+ < html xmlns ="http://www.w3.org/1999/xhtml " xmlns:epub ="http://www.idpf.org/2007/ops " xml:lang ="en ">
2
+ < head >
3
+ < title > Minimal Nav</ title >
4
+ </ head >
5
+ < body >
6
+ < nav epub:type ="toc ">
7
+ < ol >
8
+ < li > < a href ="content_001.xhtml "> content 001</ a > </ li >
9
+ </ ol >
10
+ </ nav >
11
+ < nav epub:type ="page-list ">
12
+ < ol >
13
+ < li > < a href ="content_001.xhtml#p1 "> page 1</ a > </ li >
14
+ </ ol >
15
+ </ nav >
16
+ </ body >
17
+ </ html >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <package xmlns =" http://www.idpf.org/2007/opf" version =" 3.0" xml : lang =" en" unique-identifier =" uid" >
3
+ <metadata xmlns : dc =" http://purl.org/dc/elements/1.1/" >
4
+ <dc : title id =" title" >Minimal EPUB 3.0</dc : title >
5
+ <dc : language >en</dc : language >
6
+ <dc : identifier id =" uid" >NOID</dc : identifier >
7
+ <dc : source >https://example.com</dc : source >
8
+ <meta property =" dcterms:modified" >2017-01-01T00:00:01Z</meta >
9
+ <meta property =" schema:accessibilityFeature" >structuralNavigation</meta >
10
+ <meta property =" schema:accessibilitySummary" >everything OK!</meta >
11
+ <meta property =" schema:accessibilityHazard" >noFlashingHazard</meta >
12
+ <meta property =" schema:accessibilityHazard" >noSoundHazard</meta >
13
+ <meta property =" schema:accessibilityHazard" >noMotionSimulationHazard</meta >
14
+ <meta property =" schema:accessMode" >textual</meta >
15
+ <meta property =" schema:accessModeSufficient" >textual</meta >
16
+ </metadata >
17
+ <manifest >
18
+ <item id =" nav" href =" nav.xhtml" media-type =" application/xhtml+xml" properties =" nav" />
19
+ <item id =" content_001" href =" content_001.xhtml" media-type =" application/xhtml+xml" />
20
+ </manifest >
21
+ <spine >
22
+ <itemref idref =" content_001" />
23
+ </spine >
24
+ </package >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <container version =" 1.0" xmlns =" urn:oasis:names:tc:opendocument:xmlns:container" >
3
+ <rootfiles >
4
+ <rootfile full-path =" EPUB/package.opf" media-type =" application/oebps-package+xml" />
5
+ </rootfiles >
6
+ </container >
Original file line number Diff line number Diff line change
1
+ application/epub+zip
You can’t perform that action at this time.
0 commit comments