Another epub:type mapping

This commit is contained in:
Kovid Goyal 2019-10-04 05:49:00 +05:30
parent 769cf0da51
commit b6de056d57
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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
# see https://idpf.github.io/epub-guides/epub-aria-authoring/
EPUB_TYPE_MAP = {k:'doc-' + k for k in (
'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'
@ -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['help'] = 'doc-tip'
EPUB_TYPE_MAP['page-list'] = 'doc-pagelist'
def map_epub_type(epub_type, attribs, elem):