@ -2,11 +2,11 @@ from panflute import Element, ListContainer, Inline, Block
from panflute import Cite , Code , Emph , Image , LineBreak , Link , Math , Note , Quoted , RawInline , SmallCaps , SoftBreak , Space , Span , Str , Strikeout , Strong , Subscript , Superscript , Underline
from panflute import Cite , Code , Emph , Image , LineBreak , Link , Math , Note , Quoted , RawInline , SmallCaps , SoftBreak , Space , Span , Str , Strikeout , Strong , Subscript , Superscript , Underline
from panflute import BlockQuote , BulletList , Citation , CodeBlock , Definition , DefinitionItem , DefinitionList , Div , Figure , Header , HorizontalRule , LineBlock , LineItem , ListItem , MetaBlocks , MetaBool , MetaInlines , MetaList , MetaMap , MetaString , Null , OrderedList , Para , Plain , RawBlock , Table , TableBody , TableFoot , TableHead
from panflute import BlockQuote , BulletList , Citation , CodeBlock , Definition , DefinitionItem , DefinitionList , Div , Figure , Header , HorizontalRule , LineBlock , LineItem , ListItem , MetaBlocks , MetaBool , MetaInlines , MetaList , MetaMap , MetaString , Null , OrderedList , Para , Plain , RawBlock , Table , TableBody , TableFoot , TableHead
from panflute import TableRow , TableCell , Caption , Doc
from panflute import TableRow , TableCell , Caption , Doc
from typing import Union
from typing import Union , Callable
from . whitespace import NBSP
from . whitespace import NBSP
from . elements import FQuoted
from . elements import FQuoted
from . context import Group , InlineGroup , BlockGroup
from . context import Group , InlineGroup , BlockGroup , Context
import re
import re
@ -15,6 +15,15 @@ class UnknownElementError(Exception):
pass
pass
class OutputGenerator :
class OutputGenerator :
_at_start_of_line : bool
context : Union [ Context , None ]
indent_level : int
indent_str : str
output_file : . . .
TYPE_DICT_BLOCK : dict [ type , Callable ]
TYPE_DICT_INLINE : dict [ type , Callable ]
TYPE_DICT_MISC : dict [ type , Callable ]
def __init__ ( self , output_file , indent_str : str = " \t " , initial_indent_level : int = 0 ) :
def __init__ ( self , output_file , indent_str : str = " \t " , initial_indent_level : int = 0 ) :
self . output_file = output_file
self . output_file = output_file
self . indent_str = indent_str
self . indent_str = indent_str