#NEWLINE# def __init__( self , configs = [ ] ) : #NEWLINE# #INDENT# self . config = { #NEWLINE# #INDENT# 'marker' : [ '[TOC]' , 'Text to find and replace with Table of Contents -Defaults to "[TOC]"' ] , #NEWLINE# 'slugify' : [ slugify , "Function to generate anchors based on header text-Defaults to the headerid ext's slugify function." ] , #NEWLINE# 'title' : [ None , 'Title to insert into TOC <div> - Defaults to None' ] , #NEWLINE# 'anchorlink' : [ 0 , '1 if header should be a self linkDefaults to 0' ] , #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , value ) in configs : #NEWLINE# #INDENT# self . setConfig ( key , value )