<s> r"""<STR_LIT>""" <EOL> import re <EOL> _dollar = re . compile ( r"<STR_LIT>" ) <EOL> _notdollar = re . compile ( r"<STR_LIT>" ) <EOL> def replace_dollar ( content ) : <EOL> content = _dollar . sub ( r"<STR_LIT>" , content ) <EOL> content = _notdollar . sub ( "<STR_LIT:$>" , content ) <EOL> return content <EOL> def rewrite_rst ( app , docname , source ) : <EOL> source [ <NUM_LIT:0> ] = replace_dollar ( source [ <NUM_LIT:0> ] ) <EOL> def rewrite_autodoc ( app , what , name , obj , options , lines ) : <EOL> lines [ : ] = [ replace_dollar ( L ) for L in lines ] <EOL> def setup ( app ) : <EOL> app . connect ( '<STR_LIT>' , rewrite_rst ) <EOL> app . connect ( '<STR_LIT>' , rewrite_autodoc ) <EOL> def test_dollar ( ) : <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> assert replace_dollar ( u"<STR_LIT>" ) == u"<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> test_dollar ( ) </s>
