mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Another epub:type mapping
This commit is contained in:
parent
769cf0da51
commit
b6de056d57
@ -462,6 +462,7 @@ def split_name(name):
|
|||||||
|
|
||||||
boolean_attributes = frozenset('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible'.split(',')) # noqa
|
boolean_attributes = frozenset('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible'.split(',')) # noqa
|
||||||
|
|
||||||
|
# see https://idpf.github.io/epub-guides/epub-aria-authoring/
|
||||||
EPUB_TYPE_MAP = {k:'doc-' + k for k in (
|
EPUB_TYPE_MAP = {k:'doc-' + k for k in (
|
||||||
'abstract acknowledgements afterword appendix biblioentry bibliography biblioref chapter colophon conclusion cover credit'
|
'abstract acknowledgements afterword appendix biblioentry bibliography biblioref chapter colophon conclusion cover credit'
|
||||||
' credits dedication epigraph epilogue errata footnote footnotes forward glossary glossref index introduction link noteref notice'
|
' credits dedication epigraph epilogue errata footnote footnotes forward glossary glossref index introduction link noteref notice'
|
||||||
@ -470,6 +471,7 @@ for k in 'figure term definition directory list list-item table row cell'.split(
|
|||||||
EPUB_TYPE_MAP[k] = k
|
EPUB_TYPE_MAP[k] = k
|
||||||
|
|
||||||
EPUB_TYPE_MAP['help'] = 'doc-tip'
|
EPUB_TYPE_MAP['help'] = 'doc-tip'
|
||||||
|
EPUB_TYPE_MAP['page-list'] = 'doc-pagelist'
|
||||||
|
|
||||||
|
|
||||||
def map_epub_type(epub_type, attribs, elem):
|
def map_epub_type(epub_type, attribs, elem):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user