$ d Z dZddlZddlmZmZmZ ddlmZm Z G d de Z G d d e Z G d de Z G d d e Z dS )a4 Transforms related to the front matter of a document or a section (information found before the main text): - `DocTitle`: Used to transform a lone top level section's title to the document title, promote a remaining lone top-level section's title to the document subtitle, and determine the document's title metadata (document['title']) based on the document title and/or the "title" setting. - `SectionSubTitle`: Used to transform a lone subsection into a subtitle. - `DocInfo`: Used to transform a bibliographic field list into docinfo elements. reStructuredText N)nodesparsersutils)TransformError Transformc $ e Zd ZdZd Zd Zd ZdS ) TitlePromoterzJ Abstract base class for DocTitle and SectionSubTitle transforms. c t |t j st d t | r"t |d t j rJ | | \ }}|dS | |dd |dd |d| z |dd z |dd<